🚧 Still under progress. Soon will be finished.

FunctionNode

CLASS code

Description

Represents the reflected node of a function declaration

Methods

  • getName

    code
    getName(): string

    Returns

    string:
  • getNodeType

    code
    getNodeType(): RootNodeType

    Returns

    RootNodeType:
  • getContext

    code
    getContext(): ProjectContext

    Returns

    ProjectContext:
  • getKind

    code
    getKind(): DeclarationKind.Function | MemberKind.Method

    Returns

    DeclarationKind.Function | MemberKind.Method:
  • getTSNode

    code
    getTSNode(): NodeWithFunctionDeclaration

    Returns

    NodeWithFunctionDeclaration:
  • getLine

    code
    getLine(): number | null

    Returns

    number | null:
  • getNamespace

    code
    getNamespace(): string

    Returns

    string:
  • getJSDoc

    code
    getJSDoc(): CommentNode | null

    Returns

    CommentNode | null:
  • getDecorators

    code
    getDecorators(): DecoratorNode[]

    Returns

    DecoratorNode[]:
  • getDecoratorWithName

    code
    getDecoratorWithName(name: string): DecoratorNode | null

    Parameters

    name string

    Returns

    DecoratorNode | null:
  • getSignatures

    code
    getSignatures(): SignatureNode[]

    Returns

    SignatureNode[]:
  • getModifier

    code
    getModifier(): ModifierType | null

    Returns

    ModifierType | null:
  • isGenerator

    code
    isGenerator(): boolean

    Returns

    boolean:
  • isAsync

    code
    isAsync(): boolean

    Returns

    boolean:
  • isOptional

    code
    isOptional(): boolean

    Returns

    boolean:
  • isStatic

    code
    isStatic(): boolean

    Returns

    boolean:
  • isReadOnly

    code
    isReadOnly(): boolean

    Returns

    boolean:
  • isAbstract

    code
    isAbstract(): boolean

    Returns

    boolean:
  • isInherited

    code
    isInherited(): boolean

    Returns

    boolean:
  • isArrowFunctionOrFunctionExpression

    code
    isArrowFunctionOrFunctionExpression(): boolean

    Returns

    boolean:
  • overrides

    code
    overrides(): boolean

    Returns

    boolean:
  • serialize

    code

    Serializes the reflected node

    serialize(): FunctionDeclaration | Method

    Returns

    FunctionDeclaration | Method:

    The reflected node as a serializable object