CoolFace
Apppublic

AK-21/Graphite-Industrial-Intelligence

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
previous-map.d.ts81 linesDownload Raw Back to lib
1import { SourceMapConsumer } from 'source-map-js'2 3import { ProcessOptions } from './postcss.js'4 5declare namespace PreviousMap {6  export { PreviousMap_ as default }7}8 9/**10 * Source map information from input CSS.11 * For example, source map after Sass compiler.12 *13 * This class will automatically find source map in input CSS or in file system14 * near input file (according `from` option).15 *16 * ```js17 * const root = parse(css, { from: 'a.sass.css' })18 * root.input.map //=> PreviousMap19 * ```20 */21declare class PreviousMap_ {22  /**23   * `sourceMappingURL` content.24   */25  annotation?: string26 27  /**28   * The CSS source identifier. Contains `Input#file` if the user29   * set the `from` option, or `Input#id` if they did not.30   */31  file?: string32 33  /**34   * Was source map inlined by data-uri to input CSS.35   */36  inline: boolean37 38  /**39   * Path to source map file.40   */41  mapFile?: string42 43  /**44   * The directory with source map file, if source map is in separated file.45   */46  root?: string47 48  /**49   * Source map file content.50   */51  text?: string52 53  /**54   * @param css  Input CSS source.55   * @param opts Process options.56   */57  constructor(css: string, opts?: ProcessOptions)58 59  /**60   * Create a instance of `SourceMapGenerator` class61   * from the `source-map` library to work with source map information.62   *63   * It is lazy method, so it will create object only on first call64   * and then it will use cache.65   *66   * @return Object with source map information.67   */68  consumer(): SourceMapConsumer69 70  /**71   * Does source map contains `sourcesContent` with input source text.72   *73   * @return Is `sourcesContent` present.74   */75  withContent(): boolean76}77 78declare class PreviousMap extends PreviousMap_ {}79 80export = PreviousMap81