Show / Hide Table of Contents

    Class SourceFile

    Package: grammarkdown
    Inheritance
    Node<SyntaxKind.SourceFile>
    SourceFile

    Constructors

    constructor(filename, text, elements)

    Constructs a new instance of the SourceFile class

    Declaration
    constructor(filename: string, text: string, elements: ReadonlyArray<SourceElement>);
    Parameters
    filename
    string

    text
    string

    elements
    ReadonlyArray<SourceElement>

    Properties

    elements

    Declaration
    readonly elements: ReadonlyArray<SourceElement>;
    Property Value
    ReadonlyArray<SourceElement>

    filename

    Declaration
    readonly filename: string;
    Property Value
    string

    firstChild

    Declaration
    get firstChild(): Node | undefined;
    Property Value
    Node | undefined

    imports

    Declaration
    imports: ReadonlyArray<string> | undefined;
    Property Value
    ReadonlyArray<string> | undefined

    lastChild

    Declaration
    get lastChild(): Node | undefined;
    Property Value
    Node | undefined

    lineMap

    Declaration
    readonly lineMap: LineMap;
    Property Value
    LineMap

    text

    Declaration
    readonly text: string;
    Property Value
    string

    Methods

    children()

    Declaration
    children(): IterableIterator<Node>;
    Returns
    IterableIterator<Node>

    forEachChild(cbNode)

    Declaration
    forEachChild<T>(cbNode: (node: Node) => T | undefined): T | undefined;
    Type Parameters
    T

    Parameters
    cbNode
    (node: Node) => T | undefined

    Returns
    T | undefined

    update(elements)

    Declaration
    update(elements: ReadonlyArray<SourceElement>): SourceFile;
    Parameters
    elements
    ReadonlyArray<SourceElement>

    Returns
    SourceFile

    Back to top Generated by DocFX