KC's Workspace
    Preparing search index...

    Represents a literal type.

    type A = "A"
    type B = 1

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • value: string | number | bigint | boolean | null

      Returns LiteralType

    Properties

    type: "literal"

    The type name identifier.

    value: string | number | bigint | boolean | null

    Methods

    • Return the estimated size of the type if it was all printed on one line.

      Returns number

    • Return a string representation of this type.

      Returns string

    • Returns boolean

    • Parameters

      Returns string

    • Returns LiteralType

    • Return a string representation of this type.

      Returns string

    • Visit this type, returning the value returned by the visitor.

      Type Parameters

      • T
      • A extends any[] = []

      Parameters

      Returns T

    • Visit this type, returning the value returned by the visitor.

      Type Parameters

      • T
      • A extends any[] = []

      Parameters

      Returns T | undefined