UNPKG

398 BTypeScriptView Raw
1// prettier-ignore
2declare function Type<T>(x: T): T extends string ? "String"
3 : T extends number ? "Number"
4 : T extends boolean ? "Boolean"
5 : T extends symbol ? "Symbol"
6 : T extends null ? "Null"
7 : T extends undefined ? "Undefined"
8 : T extends object ? "Object"
9 : "String" | "Number" | "Boolean" | "Symbol" | "Null" | "Undefined" | "Object" | undefined;
10export = Type;