Examples
const valuesId = typeidGeneric(Map, [String, Number])
// valuesId === 'Map<String,Number>'Function
typeidGeneric<T, U extends ConstructorFn[]>(type: Constructor<T>, types: [...U[]]): TypeIdDerives a generic TypeId lookup key from a constructor and its
constructor arguments.
For a non-empty types array, the ID is the base constructor name followed
by the argument constructor names in angle brackets, with no spaces. Use the
result with APIs that register or look up metadata for the generic type. For
an empty array, this function returns the same ID as typeid for
type. It uses each constructor’s .name; it does not inspect or instantiate
any constructor.
const valuesId = typeidGeneric(Map, [String, Number])
// valuesId === 'Map<String,Number>'