Master TypeScript 5 infer keyword for extracting function parameters, return types, promise values, and array elements at type level.
Act as a TypeScript 5 type extraction expert. Use infer to extract [TARGET_TYPE] from [SOURCE_STRUCTURE]. Build UnwrapPromise, UnwrapArray, ExtractParams for [UTILITY_NEEDS]. Handle nested inference with [RECURSIVE_DEPTH]. Combine with conditional types for [PATTERN_MATCHING]. Validate with type-level tests for [EXPECTED_OUTPUT].
Free to copy and use. Compatible with Claude 4 Opus, GPT-5, Gemini 2.5 Pro.
Specify target type to extract, source structure, utility needs, recursive depth, pattern matching rules, and expected output.
Initial release
Sign in and download this prompt to leave a review.