🚧 Still under progress. Soon will be finished.

DecoratorNode

CLASS code

Description

Represents the reflected node of a decorator call

Methods

  • getName

    code

    The name of the decorator

    getName(): string

    Returns

    string:

    The name of the decorator

  • getTSNode

    code

    The internal TypeScript node

    getTSNode(): Decorator

    Returns

    Decorator:

    The TypeScript AST node related to this reflected node

  • getContext

    code

    The context includes useful APIs that are shared across all the reflected symbols. Some APIs include the parsed configuration options, the system interface, the type checker

    getContext(): ProjectContext

    Returns

    ProjectContext:

    The analyser context

  • getJSDoc

    code

    The reflected documentation comment

    getJSDoc(): CommentNode

    Returns

    CommentNode:

    The JSDoc node

  • hasArguments

    code

    If there are arguments supplied

    hasArguments(): boolean

    Returns

    boolean:

    True if there are arguments, otherwise false

  • getArguments

    code

    The values of the arguments supplied in the call

    getArguments(): unknown[]

    Returns

    unknown[]:

    An array with the argument expression values

  • getLine

    code

    The line number where the decorator is defined (not where it’s used)

    getLine(): number | null

    Returns

    number | null:

    The start line position

  • getPath

    code

    The source file path where the decorator is defined (not where it’s used)

    getPath(): string

    Returns

    string:

    The relative source file path where the declaration is defined

  • serialize

    code

    Serializes the reflected node

    serialize(): Decorator

    Returns

    Decorator:

    The reflected node as a serializable object