Show / Hide Table of Contents

    Class AsyncHost

    Inheritance
    HostBase
    AsyncHost
    Package: grammarkdown

    Constructors

    (constructor)({ readFile, writeFile, ...baseOptions })

    Constructs a new instance of the AsyncHost class

    Declaration
    constructor({ readFile, writeFile, ...baseOptions }?: AsyncHostOptions);
    Parameters
    Type Name Description
    AsyncHostOptions { readFile, writeFile, ...baseOptions }

    Methods

    forFile(content, file, hostFallback)

    Declaration
    static forFile(content: string, file?: string, hostFallback?: AsyncHost): AsyncSingleFileHost;
    Parameters
    Type Name Description
    string content
    string file
    AsyncHost hostFallback
    Returns
    Type Description
    AsyncSingleFileHost

    getSourceFile(file, cancelable)

    Declaration
    getSourceFile(file: string, cancelable?: Cancelable): Promise<SourceFile | undefined>;
    Parameters
    Type Name Description
    string file
    Cancelable cancelable
    Returns
    Type Description
    Promise<SourceFile | undefined>

    getSourceFile(file, cancelable)

    Declaration
    getSourceFile(file: string, cancelable?: CancellationToken | Cancelable): Promise<SourceFile | undefined>;
    Parameters
    Type Name Description
    string file
    CancellationToken | Cancelable cancelable
    Returns
    Type Description
    Promise<SourceFile | undefined>

    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>

    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>
    Back to top Generated by DocFX