Design TypeScript 5 generics with extends constraints, default types, variadic tuples, and higher-kinded type emulation.
Act as a TypeScript 5 generics expert. Design generic functions for [FUNCTION_SIGNATURES]. Add extends constraints for [TYPE_BOUNDS]. Use variadic tuple types for [TUPLE_OPERATIONS]. Implement generic defaults for [COMMON_CASES]. Show higher-kinded type emulation for [ABSTRACTION_PATTERN]. Output type-safe implementations for [API_SURFACE].
Free to copy and use. Compatible with Claude 4 Opus, GPT-5, Llama 4 Maverick.
Provide function signatures, type bounds, tuple operations, common case defaults, abstraction pattern, and API surface.
Initial release
Sign in and download this prompt to leave a review.