earljs
Version:
Ergonomic, modern and type-safe assertion library
3 lines (2 loc) • 383 B
TypeScript
export declare type CanonicalType = ReturnType<typeof getCanonicalType>;
export declare function getCanonicalType(value: unknown): "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "null" | "Function" | "Array" | "Error" | "Date" | "RegExp" | "Map" | "Set" | "Promise" | "String" | "Number" | "Boolean" | "WeakMap" | "WeakSet" | "Object";