Class AsyncHost
Constructors
(constructor)({ readFile, writeFile, ...baseOptions })
Constructs a new instance of the AsyncHost
class
Declaration
constructor({ readFile, writeFile, ...baseOptions }?: AsyncHostOptions);
Parameters
Methods
forFile(content, file, hostFallback)
Declaration
static forFile(content: string, file?: string, hostFallback?: AsyncHost): AsyncSingleFileHost;
Parameters
Type |
Name |
Description |
string |
content |
|
string |
file |
|
AsyncHost |
hostFallback |
|
Returns
getSourceFile(file, cancelable)
Declaration
getSourceFile(file: string, cancelable?: Cancelable): Promise<SourceFile | undefined>;
Parameters
Type |
Name |
Description |
string |
file |
|
Cancelable |
cancelable |
|
Returns
getSourceFile(file, cancelable)
Declaration
getSourceFile(file: string, cancelable?: CancellationToken | Cancelable): Promise<SourceFile | undefined>;
Parameters
Type |
Name |
Description |
string |
file |
|
CancellationToken | Cancelable |
cancelable |
|
Returns
readFile(file, cancelable)
Declaration
readFile(file: string, cancelable?: Cancelable): Promise<string | undefined>;
Parameters
Type |
Name |
Description |
string |
file |
|
Cancelable |
cancelable |
|
Returns
Type |
Description |
Promise<string | undefined> |
|
readFile(file, cancelable)
Declaration
readFile(file: string, cancelable?: CancellationToken | Cancelable): Promise<string | undefined>;
Parameters
Type |
Name |
Description |
string |
file |
|
CancellationToken | Cancelable |
cancelable |
|
Returns
Type |
Description |
Promise<string | undefined> |
|
writeFile(file, text, cancelable)
Declaration
writeFile(file: string, text: string, cancelable?: Cancelable): Promise<void>;
Parameters
Type |
Name |
Description |
string |
file |
|
string |
text |
|
Cancelable |
cancelable |
|
Returns
Type |
Description |
Promise<void> |
|
writeFile(file, text, cancelable)
Declaration
writeFile(file: string, text: string, cancelable?: CancellationToken | Cancelable): Promise<void>;
Parameters
Type |
Name |
Description |
string |
file |
|
string |
text |
|
CancellationToken | Cancelable |
cancelable |
|
Returns
Type |
Description |
Promise<void> |
|