Class SingleFileHost
Package: grammarkdown
Warning
Deprecated
Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.Constructors
constructor(content, file, hostFallback)
Warning
Deprecated
Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.Constructs a new instance of the SingleFileHost
class
Declaration
constructor(content: string, file?: string, hostFallback?: Host);
Parameters
Properties
content
Warning
Deprecated
Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.Declaration
readonly content: string;
Property Value
file
Warning
Deprecated
Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.Declaration
readonly file: string;
Property Value
parser
Warning
Deprecated
Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.Declaration
protected get parser(): import("..").Parser;
Property Value
Methods
createParser()
Warning
Deprecated
Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.Declaration
protected createParser(): import("..").Parser;
Returns
getSourceFile(file, cancelable)
Warning
Deprecated
Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.Declaration
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 `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.Declaration
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
normalizeFileCore(file)
Warning
Deprecated
Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.Declaration
protected normalizeFileCore(file: string): string;
Parameters
- file
- string
Returns
readFile(file, cancelable)
Warning
Deprecated
Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.Declaration
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 `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.Declaration
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
registerKnownGrammarCore(_name, _file)
Warning
Deprecated
Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.Declaration
protected registerKnownGrammarCore(_name: string, _file: string): void;
Parameters
- _name
- string
- _file
- string
Returns
resolveFileCore(file, referer)
Warning
Deprecated
Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.Declaration
protected resolveFileCore(file: string, referer?: string): string;
Parameters
- file
- string
- referer
- string
Returns
resolveKnownGrammarCore(name)
Warning
Deprecated
Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.Declaration
protected resolveKnownGrammarCore(name: string): string | undefined;
Parameters
- name
- string
Returns
writeFile(file, text, cancelable)
Warning
Deprecated
Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.Declaration
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 `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.Declaration
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