typelab v1.0.1 is a zero-dependency TypeScript library providing a suite of reusable, type-level utility types for everyday TypeScript development. Released under MIT license with active maintenance, it offers aliases (Primitive, Nullable), assertions (IsExtends, IsEqual, IsAny), conditional types (IfExtends, IfEqual, IfAny), and utility types (FunctionCallbackify, FunctionPromisify, ObjectAssign). Unlike similar libraries like type-fest or utility-types, typelab focuses purely on type-level operations with no runtime code, making it lightweight for dev dependencies. The package is ESM and CommonJS compatible, ships with TypeScript definitions, and has a simple, documented API.
npm install typelabNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates importing and using several typelab utility types for type-level checks and object merging.
Explicitly union with undefined: Nullable<T> | undefined
For non-distributive behavior, use IsEqual or IfEqual with exact types.
Check release notes before upgrading.
N/A
Primitive includes string, number, etc. Ensure value is a primitive: const x: Primitive = 'hello';
Use Nullable<T> | undefined or cast: const x: Nullable<string> | undefined = null;
Ensure the type is a function signature: type Fn = (a: number) => string; type Cb = FunctionCallbackify<Fn>;
No dependency data recorded yet.