Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ReferenceType

Represents a type that refers to another reflection like a class, interface or enum.

let value: MyClass;

Hierarchy

  • Type
    • ReferenceType

Index

Constructors

constructor

  • Create a new instance of ReferenceType.

    Parameters

    • name: string

      The name of the referenced type.

    • symbolID: number

      The symbol id of the referenced type as returned from the TypeScript compiler.

    • Optional reflection: Reflection

      The resolved reflection if already known.

    Returns ReferenceType

Properties

name

name: string

The name of the referenced type.

If the symbol cannot be found cause it's not part of the documentation this can be used to represent the type.

reflection

reflection: Reflection

The resolved reflection.

The TypePlugin will try to set this property in the resolving phase.

symbolID

symbolID: number

The symbol id of the referenced type as returned from the TypeScript compiler.

After the all reflections have been generated this is can be used to lookup the relevant reflection with ProjectReflection.symbolMapping.

type

type: string = "reference"

The type name identifier.

typeArguments

typeArguments: Type[]

The type arguments of this reference.

Static SYMBOL_ID_RESOLVED

SYMBOL_ID_RESOLVED: number = -1

Special symbol ID noting that the reference of a ReferenceType was known when creating the type.

Static SYMBOL_ID_RESOLVE_BY_NAME

SYMBOL_ID_RESOLVE_BY_NAME: number = -2

Special symbol ID noting that the reference should be resolved by the type name.

Methods

clone

equals

  • Test whether this type equals the given type.

    Parameters

    • type: ReferenceType

      The type that should be checked for equality.

    Returns boolean

    TRUE if the given type equals this type, FALSE otherwise.

toObject

  • toObject(): any

toString

  • toString(): string

Static isTypeListEqual

  • isTypeListEqual(a: Type[], b: Type[]): boolean

Static isTypeListSimiliar

  • isTypeListSimiliar(a: Type[], b: Type[]): boolean

Generated using TypeDoc