KC's Workspace
    Preparing search index...

    Interface FunctionLikeDeclarationBase

    Several node kinds share function-like features such as a signature, a name, and a body. These nodes should extend FunctionLikeDeclarationBase. Examples:

    • FunctionDeclaration
    • MethodDeclaration
    • AccessorDeclaration
    interface FunctionLikeDeclarationBase {
        _declarationBrand: any;
        _functionLikeDeclarationBrand: any;
        _jsdocContainerBrand: any;
        asteriskToken?: AsteriskToken;
        body?: Expression | Block;
        end: number;
        exclamationToken?: ExclamationToken;
        flags: NodeFlags;
        kind:
            | MethodSignature
            | MethodDeclaration
            | Constructor
            | GetAccessor
            | SetAccessor
            | CallSignature
            | ConstructSignature
            | IndexSignature
            | FunctionType
            | ConstructorType
            | FunctionExpression
            | ArrowFunction
            | FunctionDeclaration
            | JSDocFunctionType;
        name?: PropertyName;
        parameters: NodeArray<ParameterDeclaration>;
        parent: Node;
        pos: number;
        questionToken?: QuestionToken;
        type?: TypeNode;
        typeParameters?: NodeArray<TypeParameterDeclaration>;
        forEachChild<T>(
            cbNode: (node: Node) => T | undefined,
            cbNodeArray?: (nodes: NodeArray<Node>) => T | undefined,
        ): T | undefined;
        getChildAt(index: number, sourceFile?: SourceFile): Node;
        getChildCount(sourceFile?: SourceFile): number;
        getChildren(sourceFile?: SourceFile): readonly Node[];
        getEnd(): number;
        getFirstToken(sourceFile?: SourceFile): Node | undefined;
        getFullStart(): number;
        getFullText(sourceFile?: SourceFile): string;
        getFullWidth(): number;
        getLastToken(sourceFile?: SourceFile): Node | undefined;
        getLeadingTriviaWidth(sourceFile?: SourceFile): number;
        getSourceFile(): SourceFile;
        getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number;
        getText(sourceFile?: SourceFile): string;
        getWidth(sourceFile?: SourceFileLike): number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    _declarationBrand: any
    _functionLikeDeclarationBrand: any
    _jsdocContainerBrand: any
    asteriskToken?: AsteriskToken
    body?: Expression | Block
    end: number
    exclamationToken?: ExclamationToken
    flags: NodeFlags
    kind:
        | MethodSignature
        | MethodDeclaration
        | Constructor
        | GetAccessor
        | SetAccessor
        | CallSignature
        | ConstructSignature
        | IndexSignature
        | FunctionType
        | ConstructorType
        | FunctionExpression
        | ArrowFunction
        | FunctionDeclaration
        | JSDocFunctionType
    parent: Node
    pos: number
    questionToken?: QuestionToken
    type?: TypeNode

    Methods