AsyncCompiler
The result of creating an asynchronous compiler. Returned byinitAsyncCompiler.
Hierarchy
- AsyncCompiler
- Defined injs-api-doc/compile.d.ts:89
Index
Constructors
Methods
Constructors
Private
constructor
- new
Async Compiler():AsyncCompiler Throws an error if constructed directly, instead of viainitAsyncCompiler.
ReturnsAsyncCompiler
- Defined injs-api-doc/compile.d.ts:94
Methods
compile Async
- compile
Async(path:string,options?:Options<"async">):Promise<CompileResult> ThecompileAsync method exposed through an Async Compiler instancewhile it is active. If this is called afterdispose on the AsyncCompiler instance, an error will be thrown.
During the Async Compiler instance's lifespan, given the same input, thiswill return an identical result to thecompileAsync method exposedat the module root.
Parameters
path:string
Optional
options:Options<"async">
ReturnsPromise<CompileResult>
- Defined injs-api-doc/compile.d.ts:105
compile String Async
- compile
String Async(source:string,options?:StringOptions<"async">):Promise<CompileResult> ThecompileStringAsync method exposed through an Async Compilerinstance while it is active. If this is called afterdispose on theAsync Compiler instance, an error will be thrown.
During the Async Compiler instance's lifespan, given the same input, thiswill return an identical result to thecompileStringAsync methodexposed at the module root.
Parameters
source:string
Optional
options:StringOptions<"async">
ReturnsPromise<CompileResult>
- Defined injs-api-doc/compile.d.ts:119
dispose
- dispose():Promise<void>
Ends the lifespan of this Async Compiler instance. After this is invoked,all subsequent calls to the Compiler instance's
compileAsync
orcompileStringAsync
methods will result in an error.Any compilations that are submitted before
dispose
will not be cancelled,and will be allowed to settle.After all compilations have been settled and Sass completes any internaltask cleanup,
dispose
will resolve its promise.ReturnsPromise<void>
- Defined injs-api-doc/compile.d.ts:135