🚧 Still under progress. Soon will be finished.

InferTypeNode

CLASS code

Description

Represents the reflected infer type For example: type foo<T> = T extends Promise<infer U> ? U : never

Methods

  • getContext

    code
    getContext(): ProjectContext

    Returns

    ProjectContext:
  • getTSNode

    code
    getTSNode(): InferTypeNode

    Returns

    InferTypeNode:
  • getTSType

    code
    getTSType(): Type

    Returns

    Type:
  • getKind

    code
    getKind(): TypeKind

    Returns

    TypeKind:
  • getText

    code
    getText(): string

    Returns

    string:
  • getConstraint

    code
    getConstraint(): ReflectedTypeNode<TypeNode> | null

    Returns

    ReflectedTypeNode<TypeNode> | null:
  • serialize

    code

    Serializes the reflected type

    serialize(): Type

    Returns

    Type:

    The type as a serializable object