A comprehensive collection of high-performance TypeScript type utilities focused on type safety and developer experience.
- Zero Runtime Overhead - Pure type definitions
- Type Safety - Advanced constraint utilities
- Modular Design - Import only what you need
- Rich Toolset - From basic to advanced type operations
- IntelliSense Optimized - Great IDE support
npm install devtypesimport { Merge, RequireExactlyOne } from 'devtypes';
type UserBase = { id: number; name: string; email?: string };
type UserAuth = { email: string; password: string };
// Merge types (smart conflict resolution)
type User = Merge< UserBase, UserAuth >;
// { id: number; name: string; email: string; password: string }
// Require exactly one field
type LoginCredentials = RequireExactlyOne<
{ email?: string; phone?: string; username?: string; },
'email' | 'phone' | 'username'
>;import { DeepPartial, DeepRequired } from 'devtypes';
interface Config {
server: {
port: number;
host: string;
ssl?: {
cert: string;
key: string;
};
};
database: {
url: string;
timeout?: number;
};
}
// Make everything optional
type PartialConfig = DeepPartial< Config >;
// Make everything required
type FullConfig = DeepRequired< Config >;- base - Core type utilities
- collections - Array and object operations
- combinators - Union and tuple operations
- constraints - Property requirement utilities
- functionals - Function type utilities
- primitives - Primitive type helpers
- utils - General type transformations
Import from specific modules:
// Good
import { Merge } from 'devtypes/types/utils';
// Avoid
import { Merge } from 'devtypes';Copyright 2025 Paul Köhler (komed3).
Distributed under the MIT license.