#
whycq
2024-07-16 806007c405aad9c6caa0e9ca31f4e460edb47c53
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/**
 * The value of `this` in the context of a {@link LegacyImporter} or {@link
 * LegacyFunction} callback.
 *
 * @category Legacy
 * @deprecated This is only used by the legacy {@link render} and {@link
 * renderSync} APIs. Use {@link compile}, {@link compileString}, {@link
 * compileAsync}, and {@link compileStringAsync} instead.
 */
export interface LegacyPluginThis {
  /**
   * A partial representation of the options passed to {@link render} or {@link
   * renderSync}.
   */
  options: {
    /** The same {@link LegacyPluginThis} instance that contains this object. */
    context: LegacyPluginThis;
 
    /**
     * The value passed to {@link LegacyFileOptions.file} or {@link
     * LegacyStringOptions.file}.
     */
    file?: string;
 
    /** The value passed to {@link LegacyStringOptions.data}. */
    data?: string;
 
    /**
     * The value passed to {@link LegacySharedOptions.includePaths} separated by
     * `";"` on Windows or `":"` on other operating systems. This always
     * includes the current working directory as the first entry.
     */
    includePaths: string;
 
    /** Always the number 10. */
    precision: 10;
 
    /** Always the number 1. */
    style: 1;
 
    /** 1 if {@link LegacySharedOptions.indentType} was `"tab"`, 0 otherwise. */
    indentType: 1 | 0;
 
    /**
     * The value passed to {@link LegacySharedOptions.indentWidth}, or `2`
     * otherwise.
     */
    indentWidth: number;
 
    /**
     * The value passed to {@link LegacySharedOptions.linefeed}, or `"\n"`
     * otherwise.
     */
    linefeed: '\r' | '\r\n' | '\n' | '\n\r';
 
    /** A partially-constructed {@link LegacyResult} object. */
    result: {
      /** Partial information about the compilation in progress. */
      stats: {
        /**
         * The number of milliseconds between 1 January 1970 at 00:00:00 UTC and
         * the time at which Sass compilation began.
         */
        start: number;
 
        /**
         * {@link LegacyFileOptions.file} if it was passed, otherwise the string
         * `"data"`.
         */
        entry: string;
      };
    };
  };
}