Class AsyncSingleFileHost
Inheritance
AsyncSingleFileHost
Constructors
(constructor)(file, content, hostFallback)
Constructs a new instance of the AsyncSingleFileHost
class
Declaration
constructor(file: string, content: string, hostFallback?: AsyncHost);
Parameters
Type |
Name |
Description |
string |
file |
|
string |
content |
|
AsyncHost |
hostFallback |
|
Properties
content
Declaration
readonly content: string;
Property Value
file
Declaration
Property Value
Methods
normalizeFile(file)
Declaration
normalizeFile(file: string): string;
Parameters
Type |
Name |
Description |
string |
file |
|
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> |
|
resolveFile(file, referer)
Declaration
resolveFile(file: string, referer?: string): string;
Parameters
Type |
Name |
Description |
string |
file |
|
string |
referer |
|
Returns
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> |
|