Type alias ExtractToken<T>

ExtractToken<T>: T extends Token<infer U>
    ? U
    : never

Extract the type of a Token.

Type Parameters

  • T

Example

const token = new Token<string>();
const value: ExtractToken<typeof token> = "Hello!";

Remarks

This implements https://github.com/typestack/typedi/pull/1127.

Generated using TypeDoc