Show / Hide Table of Contents

    Class SingleFileHost

    Package: grammarkdown
    Warning

    Deprecated

    Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.
    Inheritance
    HostBase
    Host
    SingleFileHost

    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
    content
    string

    file
    string

    hostFallback
    Host

    Properties

    content

    Warning

    Deprecated

    Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.
    Declaration
    readonly content: string;
    Property Value
    string

    file

    Warning

    Deprecated

    Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.
    Declaration
    readonly file: string;
    Property Value
    string

    parser

    Warning

    Deprecated

    Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.
    Declaration
    protected get parser(): import("..").Parser;
    Property Value
    import("..").Parser

    Methods

    createParser()

    Warning

    Deprecated

    Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.
    Declaration
    protected createParser(): import("..").Parser;
    Returns
    import("..").Parser

    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
    Promise<SourceFile | undefined>

    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
    Promise<SourceFile | undefined>

    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
    SourceFile | undefined

    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
    SourceFile | undefined

    normalizeFileCore(file)

    Warning

    Deprecated

    Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.
    Declaration
    protected normalizeFileCore(file: string): string;
    Parameters
    file
    string

    Returns
    string

    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
    Promise<string | undefined>

    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
    Promise<string | undefined>

    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
    string | undefined

    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
    string | undefined

    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
    void

    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
    string

    resolveKnownGrammarCore(name)

    Warning

    Deprecated

    Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.
    Declaration
    protected resolveKnownGrammarCore(name: string): string | undefined;
    Parameters
    name
    string

    Returns
    string | undefined

    writeFile(file, text, cancelable)

    Warning

    Deprecated

    Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.
    Declaration
    writeFile(file: string, text: string, cancelable?: Cancelable): Promise<void>;
    Parameters
    file
    string

    text
    string

    cancelable
    Cancelable

    Returns
    Promise<void>

    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
    file
    string

    text
    string

    cancelable
    CancellationToken | Cancelable

    Returns
    Promise<void>

    writeFileSync(file, text, cancelable)

    Warning

    Deprecated

    Use `CoreSyncHost.forFile` or `CoreAsyncHost.forFile` instead.
    Declaration
    writeFileSync(file: string, text: string, cancelable?: Cancelable): void;
    Parameters
    file
    string

    text
    string

    cancelable
    Cancelable

    Returns
    void

    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
    file
    string

    text
    string

    cancelable
    CancellationToken | Cancelable

    Returns
    void

    Back to top Generated by DocFX