Class Host
Package: grammarkdown
Warning
Deprecated
Use `SyncHost` or `AsyncHost` insteadConstructors
constructor(options)
Warning
Deprecated
Use `SyncHost` or `AsyncHost` insteadConstructs a new instance of the Host
class
Declaration
constructor(options?: HostOptions);
Parameters
- options
- HostOptions
Methods
getSourceFile(file, cancelable)
Warning
Deprecated
Use `SyncHost` or `AsyncHost` insteadDeclaration
getSourceFile(file: string, cancelable?: Cancelable): Promise<SourceFile | undefined>;
Parameters
- file
- string
- cancelable
- Cancelable
Returns
getSourceFile(file, cancelable)
Warning
Deprecated
since 2.1.0 - `prex.CancellationToken` may no longer be accepted in future releases. Please use a token that implements `@esfx/cancelable.Cancelable`Declaration
getSourceFile(file: string, cancelable?: CancellationToken | Cancelable): Promise<SourceFile | undefined>;
Parameters
- file
- string
- cancelable
- CancellationToken | Cancelable
Returns
getSourceFileSync(file, cancelable)
Warning
Deprecated
Use `SyncHost` or `AsyncHost` insteadDeclaration
getSourceFileSync(file: string, cancelable?: Cancelable): SourceFile | undefined;
Parameters
- file
- string
- cancelable
- Cancelable
Returns
getSourceFileSync(file, cancelable)
Warning
Deprecated
since 2.1.0 - `prex.CancellationToken` may no longer be accepted in future releases. Please use a token that implements `@esfx/cancelable.Cancelable`Declaration
getSourceFileSync(file: string, cancelable?: CancellationToken | Cancelable): SourceFile | undefined;
Parameters
- file
- string
- cancelable
- CancellationToken | Cancelable
Returns
readFile(file, cancelable)
Warning
Deprecated
Use `SyncHost` or `AsyncHost` insteadDeclaration
readFile(file: string, cancelable?: Cancelable): Promise<string | undefined>;
Parameters
- file
- string
- cancelable
- Cancelable
Returns
readFile(file, cancelable)
Warning
Deprecated
since 2.1.0 - `prex.CancellationToken` may no longer be accepted in future releases. Please use a token that implements `@esfx/cancelable.Cancelable`Declaration
readFile(file: string, cancelable?: CancellationToken | Cancelable): Promise<string | undefined>;
Parameters
- file
- string
- cancelable
- CancellationToken | Cancelable
Returns
readFileSync(file, cancelable)
Warning
Deprecated
Use `SyncHost` or `AsyncHost` insteadDeclaration
readFileSync(file: string, cancelable?: Cancelable): string | undefined;
Parameters
- file
- string
- cancelable
- Cancelable
Returns
readFileSync(file, cancelable)
Warning
Deprecated
since 2.1.0 - `prex.CancellationToken` may no longer be accepted in future releases. Please use a token that implements `@esfx/cancelable.Cancelable`Declaration
readFileSync(file: string, cancelable?: CancellationToken | Cancelable): string | undefined;
Parameters
- file
- string
- cancelable
- CancellationToken | Cancelable
Returns
resolveFileCore(file, referer)
Warning
Deprecated
Use `SyncHost` or `AsyncHost` insteadDeclaration
protected resolveFileCore(file: string, referer?: string): string;
Parameters
- file
- string
- referer
- string
Returns
writeFile(file, text, cancelable)
Warning
Deprecated
Use `SyncHost` or `AsyncHost` insteadDeclaration
writeFile(file: string, text: string, cancelable?: Cancelable): Promise<void>;
Parameters
Returns
writeFile(file, text, cancelable)
Warning
Deprecated
since 2.1.0 - `prex.CancellationToken` may no longer be accepted in future releases. Please use a token that implements `@esfx/cancelable.Cancelable`Declaration
writeFile(file: string, text: string, cancelable?: CancellationToken | Cancelable): Promise<void>;
Parameters
Returns
writeFileSync(file, text, cancelable)
Warning
Deprecated
Use `SyncHost` or `AsyncHost` insteadDeclaration
writeFileSync(file: string, text: string, cancelable?: Cancelable): void;
Parameters
Returns
writeFileSync(file, text, cancelable)
Warning
Deprecated
since 2.1.0 - `prex.CancellationToken` may no longer be accepted in future releases. Please use a token that implements `@esfx/cancelable.Cancelable`Declaration
writeFileSync(file: string, text: string, cancelable?: CancellationToken | Cancelable): void;
Parameters
Returns