Avancé
TypeScript Utility Library
Advanced TypeScript utility types library
Prompt Complet
Write a comprehensive TypeScript utility type library: DeepPartial, DeepRequired, DeepReadonly, DeepOmit, DeepPick, branded types for Newtype pattern, union helpers, Curry, Compose, Pipe, Maybe, Result, Either monads, async utilities, validation types, path type utilities with JSDoc docs and test cases
Compatible avec
✨GPT-4o✨Claude 3.5 Sonnet✨Cursor✨GitHub Copilot
Débutant Rating
4.6(1,950)
Stats
4,200Vues
1,020Copies
1,950J'aime
1,020Sauvegardes
Sortie Attendue✨ Haute Qualité
Advanced TypeScript utility type library with branded types, monads, and deep utility types
The AI would generate utility types like:
type DeepPartial<T> = {
[P in keyof T]?: T[P] extends object
? DeepPartial<T[P]> : T[P];
};
type Branded<T, B> = T & { __brand: B };
type USD = Branded<number, 'USD'>;
type Result<T, E = Error> =
| { ok: true; value: T }
| { ok: false; error: E };
type Path<T> = T extends object
? { [K in keyof T]:
`${K & string}.${Path<T[K]>}` }[keyof T]
: never;
Plus: Curry, Compose, Pipe, Maybe, Either,
async utilities, validation types with JSDoc