UNPKG

789 BTypeScriptView Raw
1/**
2 * A runtime object which captures compile-time type information.
3 *
4 * #### Notes
5 * A token captures the compile-time type of an interface or class in
6 * an object which can be used at runtime in a type-safe fashion.
7 */
8export declare class Token<T> {
9 /**
10 * Construct a new token.
11 *
12 * @param name - A human readable name for the token.
13 * @param description - Token purpose description for documentation.
14 */
15 constructor(name: string, description?: string);
16 /**
17 * Token purpose description.
18 */
19 readonly description?: string;
20 /**
21 * The human readable name for the token.
22 *
23 * #### Notes
24 * This can be useful for debugging and logging.
25 */
26 readonly name: string;
27 private _tokenStructuralPropertyT;
28}