54d82015d3868422ac4171fdf3f422ef01c22c87ca1a48343e2d85ca35c138b04401ab636840df3e6141ed9362ffd53392b0ac77512a14c28e329387e3a59c 2.1 KB

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