mirror of
https://github.com/sass/sass.git
synced 2024-09-21 10:37:22 +00:00
Rename ImporterThis and PluginThis to clearly indicate legacy status
This commit is contained in:
parent
2f3c06fde0
commit
e0b72c11ba
4
js-api-doc/index.d.ts
vendored
4
js-api-doc/index.d.ts
vendored
@ -57,7 +57,7 @@ export {
|
||||
types,
|
||||
} from './legacy/function';
|
||||
export {
|
||||
ImporterThis,
|
||||
LegacyImporterThis,
|
||||
LegacyAsyncImporter,
|
||||
LegacySyncImporter,
|
||||
LegacyImporter,
|
||||
@ -68,7 +68,7 @@ export {
|
||||
LegacyStringOptions,
|
||||
LegacyOptions,
|
||||
} from './legacy/options';
|
||||
export {PluginThis} from './legacy/plugin_this';
|
||||
export {LegacyPluginThis} from './legacy/plugin_this';
|
||||
export {LegacyResult, render, renderSync} from './legacy/render';
|
||||
|
||||
export const info: string;
|
||||
|
6
js-api-doc/legacy/function.d.ts
vendored
6
js-api-doc/legacy/function.d.ts
vendored
@ -1,12 +1,12 @@
|
||||
import {PluginThis} from './plugin_this';
|
||||
import {LegacyPluginThis} from './plugin_this';
|
||||
|
||||
export type LegacySyncFunction = (
|
||||
this: PluginThis,
|
||||
this: LegacyPluginThis,
|
||||
...args: LegacyValue[]
|
||||
) => LegacyValue;
|
||||
|
||||
export type LegacyAsyncFunction = (
|
||||
this: PluginThis,
|
||||
this: LegacyPluginThis,
|
||||
...args: [...LegacyValue[], (type: LegacyValue) => void]
|
||||
) => void;
|
||||
|
||||
|
8
js-api-doc/legacy/importer.d.ts
vendored
8
js-api-doc/legacy/importer.d.ts
vendored
@ -1,17 +1,17 @@
|
||||
import {PluginThis} from './plugin_this';
|
||||
import {LegacyPluginThis} from './plugin_this';
|
||||
|
||||
interface ImporterThis extends PluginThis {
|
||||
interface LegacyImporterThis extends LegacyPluginThis {
|
||||
fromImport: boolean;
|
||||
}
|
||||
|
||||
type LegacySyncImporter = (
|
||||
this: ImporterThis,
|
||||
this: LegacyImporterThis,
|
||||
url: string,
|
||||
prev: string
|
||||
) => {file: string} | {contents: string};
|
||||
|
||||
type LegacyAsyncImporter = (
|
||||
this: ImporterThis,
|
||||
this: LegacyImporterThis,
|
||||
url: string,
|
||||
prev: string,
|
||||
done: (data: {file: string} | {contents: string} | Error) => void
|
||||
|
2
js-api-doc/legacy/plugin_this.d.ts
vendored
2
js-api-doc/legacy/plugin_this.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
export interface PluginThis {
|
||||
export interface LegacyPluginThis {
|
||||
options: {
|
||||
file?: string;
|
||||
|
||||
|
4
spec/js-api/index.d.ts
vendored
4
spec/js-api/index.d.ts
vendored
@ -79,7 +79,7 @@ export {
|
||||
types,
|
||||
} from './legacy/function';
|
||||
export {
|
||||
ImporterThis,
|
||||
LegacyImporterThis,
|
||||
LegacyAsyncImporter,
|
||||
LegacySyncImporter,
|
||||
LegacyImporter,
|
||||
@ -90,7 +90,7 @@ export {
|
||||
LegacyStringOptions,
|
||||
LegacyOptions,
|
||||
} from './legacy/options';
|
||||
export {PluginThis} from './legacy/plugin_this';
|
||||
export {LegacyPluginThis} from './legacy/plugin_this';
|
||||
export {LegacyResult, render, renderSync} from './legacy/render';
|
||||
|
||||
/**
|
||||
|
6
spec/js-api/legacy/function.d.ts
vendored
6
spec/js-api/legacy/function.d.ts
vendored
@ -1,12 +1,12 @@
|
||||
import {PluginThis} from './plugin_this';
|
||||
import {LegacyPluginThis} from './plugin_this';
|
||||
|
||||
export type LegacySyncFunction = (
|
||||
this: PluginThis,
|
||||
this: LegacyPluginThis,
|
||||
...args: LegacyValue[]
|
||||
) => LegacyValue;
|
||||
|
||||
export type LegacyAsyncFunction = (
|
||||
this: PluginThis,
|
||||
this: LegacyPluginThis,
|
||||
...args: [...LegacyValue[], (type: LegacyValue) => void]
|
||||
) => void;
|
||||
|
||||
|
8
spec/js-api/legacy/importer.d.ts
vendored
8
spec/js-api/legacy/importer.d.ts
vendored
@ -1,10 +1,10 @@
|
||||
import {PluginThis} from './plugin_this';
|
||||
import {LegacyPluginThis} from './plugin_this';
|
||||
|
||||
/**
|
||||
* The interface for the `this` keyword for custom importers. The implementation
|
||||
* must invoke importers with an appropriate `this`.
|
||||
*/
|
||||
interface ImporterThis extends PluginThis {
|
||||
interface LegacyImporterThis extends LegacyPluginThis {
|
||||
/**
|
||||
* `true` if this importer invocation was caused by an `@import` statement and
|
||||
* `false` otherwise.
|
||||
@ -16,13 +16,13 @@ interface ImporterThis extends PluginThis {
|
||||
}
|
||||
|
||||
type LegacySyncImporter = (
|
||||
this: ImporterThis,
|
||||
this: LegacyImporterThis,
|
||||
url: string,
|
||||
prev: string
|
||||
) => {file: string} | {contents: string};
|
||||
|
||||
type LegacyAsyncImporter = (
|
||||
this: ImporterThis,
|
||||
this: LegacyImporterThis,
|
||||
url: string,
|
||||
prev: string,
|
||||
done: (data: {file: string} | {contents: string} | Error) => void
|
||||
|
2
spec/js-api/legacy/plugin_this.d.ts
vendored
2
spec/js-api/legacy/plugin_this.d.ts
vendored
@ -3,7 +3,7 @@
|
||||
* functions. The implementation must invoke importers and custom functions with
|
||||
* an appropriate `this`.
|
||||
*/
|
||||
export interface PluginThis {
|
||||
export interface LegacyPluginThis {
|
||||
options: {
|
||||
/** The `file` option passed to the `render()` or `renderSync()` call. */
|
||||
file?: string;
|
||||
|
Loading…
Reference in New Issue
Block a user