Class SyncHost
Constructors
(constructor)({ readFileSync, writeFileSync, ...baseOptions })
Constructs a new instance of the SyncHost
class
Declaration
constructor({ readFileSync, writeFileSync, ...baseOptions }?: SyncHostOptions);
Parameters
Type |
Name |
Description |
SyncHostOptions |
{ readFileSync, writeFileSync, ...baseOptions } |
|
Methods
forFile(content, file, hostFallback)
Declaration
static forFile(content: string, file?: string, hostFallback?: SyncHost): SyncSingleFileHost;
Parameters
Type |
Name |
Description |
string |
content |
|
string |
file |
|
SyncHost |
hostFallback |
|
Returns
getSourceFileSync(file, cancelable)
Declaration
getSourceFileSync(file: string, cancelable?: Cancelable): SourceFile | undefined;
Parameters
Type |
Name |
Description |
string |
file |
|
Cancelable |
cancelable |
|
Returns
getSourceFileSync(file, cancelable)
Declaration
getSourceFileSync(file: string, cancelable?: CancellationToken | Cancelable): SourceFile | undefined;
Parameters
Type |
Name |
Description |
string |
file |
|
CancellationToken | Cancelable |
cancelable |
|
Returns
readFileSync(file, cancelable)
Declaration
readFileSync(file: string, cancelable?: Cancelable): string | undefined;
Parameters
Type |
Name |
Description |
string |
file |
|
Cancelable |
cancelable |
|
Returns
Type |
Description |
string | undefined |
|
readFileSync(file, cancelable)
Declaration
readFileSync(file: string, cancelable?: CancellationToken | Cancelable): string | undefined;
Parameters
Type |
Name |
Description |
string |
file |
|
CancellationToken | Cancelable |
cancelable |
|
Returns
Type |
Description |
string | undefined |
|
writeFileSync(file, text, cancelable)
Declaration
writeFileSync(file: string, text: string, cancelable?: Cancelable): void;
Parameters
Type |
Name |
Description |
string |
file |
|
string |
text |
|
Cancelable |
cancelable |
|
Returns
writeFileSync(file, text, cancelable)
Declaration
writeFileSync(file: string, text: string, cancelable?: CancellationToken | Cancelable): void;
Parameters
Type |
Name |
Description |
string |
file |
|
string |
text |
|
CancellationToken | Cancelable |
cancelable |
|
Returns