🚧 Still under progress. Soon will be finished.

EnumNode

CLASS code

Description

Represents the reflected node of an enumerable declaration

Methods

  • getNodeType

    code

    The reflected node kind

    getNodeType(): RootNodeType

    Returns

    RootNodeType:

    A declaration kind node

  • getKind

    code

    The reflected declaration kind

    getKind(): DeclarationKind.Enum

    Returns

    DeclarationKind.Enum:

    An Enum kind node

  • getTSNode

    code

    The original TypeScript node

    getTSNode(): EnumDeclaration

    Returns

    EnumDeclaration:

    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

  • getName

    code

    Gets the name of the enum declaration

    getName(): string

    Returns

    string:

    The name of the enum declaration

  • getLine

    code

    The line position where the node is defined

    getLine(): number

    Returns

    number:

    The start line position number

  • getNamespace

    code

    The namespace where the enum declaration is defined.

    getNamespace(): string

    Returns

    string:

    The namespace name if found one, otherwise an empty string

  • getJSDoc

    code

    The reflected documentation comment

    getJSDoc(): CommentNode

    Returns

    CommentNode:

    The JSDoc node

  • getMembers

    code

    The reflected members of the enum declaration

    getMembers(): EnumMemberNode[]

    Returns

    EnumMemberNode[]:

    The array of reflected enum members

  • serialize

    code

    Serializes the reflected node

    serialize(): EnumDeclaration

    Returns

    EnumDeclaration:

    The reflected node as a serializable object