Judging by definition:
export const Type = Function; export interface Type<T> extends Function { new (...args: any[]): T; }
Type is just a function. Type<T> is just some function / type when building (using any combination of arguments), creates T That is, in other words, a type definition. Remember that "types" in javascript (in the sense of OO) are represented using functions. And it corresponds to classes, interfaces, etc. In typescript.
Given that the following should be done:
class Foo { s: string; } class Bar { s: number; } class Biz { ss: string; } class Baz { s: string; t: number; } let x: Type<{ s: string }>;
source share