to-typed
Version:
Type-guards, casts and converts unknowns into typed values
20 lines (17 loc) • 761 B
JavaScript
/*
There are 8 values that typeof can return: string, number, bigint, boolean, symbol, undefined, object, and function.
Values that are typeof object can be further split into null and non-null object.
I'm partitioning these 9 sets into 3 groups:
- PrimitiveValue: string, number, bigint, boolean, symbol.
- TS Type: PrimitiveValues
- Guard: isPrimitiveValue
- Nothing: undefined and null
- TS Type: Nothing
- Guard: isNothing
- object: non-null object and function
- TS Type: object
- Guard: isObject
So far, the TypeScript object type seems to exactly match values that are typeof function or non-null object.
*/
export {};
//# sourceMappingURL=types.js.map