🚧 Still under progress. Soon will be finished.

UnionTypeNode

CLASS code

Description

Represents a union type. For example: type foo = string | number

Methods

  • getContext

    code
    getContext(): ProjectContext

    Returns

    ProjectContext:
  • getTSNode

    code
    getTSNode(): UnionTypeNode

    Returns

    UnionTypeNode:
  • getTSType

    code
    getTSType(): Type

    Returns

    Type:
  • getKind

    code
    getKind(): TypeKind

    Returns

    TypeKind:
  • getText

    code
    getText(): string

    Returns

    string:
  • getElements

    code
    getElements(): ReflectedTypeNode<TypeNode>[]

    Returns

    ReflectedTypeNode<TypeNode>[]:
  • serialize

    code

    Serializes the reflected type

    serialize(): Type

    Returns

    Type:

    The type as a serializable object