Build TypeScript 5 conditional types with infer keyword for extracting nested types, return types, and promise unwrapping.
Act as a TypeScript 5 type-level programmer. Create conditional types for [TYPE_CONDITION]. Use infer to extract [NESTED_TYPE] from [WRAPPER_TYPE]. Build recursive conditional types for [DEEP_UNWRAP]. Add distributive behavior for [UNION_INPUT]. Show type-test assertions with [EXPECTED_RESULTS].
Free to copy and use. Compatible with Claude 4 Opus, GPT-5, Gemini 2.5 Pro.
Describe the type condition, nested type to extract, wrapper type, deep unwrap target, union input, and expected results.
Initial release
Sign in and download this prompt to leave a review.