Class Token<T>

A runtime object which captures compile-time type information.

Notes

A token captures the compile-time type of an interface or class in an object which can be used at runtime in a type-safe fashion.

Type Parameters

  • T

Constructors

  • Construct a new token.

    Type Parameters

    • T

    Parameters

    • name: string

      A human readable name for the token.

    • Optional description: string

      Token purpose description for documentation.

    Returns Token<T>

Properties

_tokenStructuralPropertyT: T
description?: string

Token purpose description.

name: string

The human readable name for the token.

Notes

This can be useful for debugging and logging.