memesearch
TypeScript Ternary Overload

TypeScript Ternary Overload

Download Find similar pictures
Text on the meme
ESLint: ⚠️ "Nesting ternary expressions can make code more difficult to understand." TypeScript: type ExtractRouteParams<T extends string> = string extends T ? Record<string, string> : T extends `${infer Start}:${infer Param}/${infer Rest}` ? {[k in Param | keyof ExtractRouteParams<Rest>]: string} : T extends `${infer Start}:${infer Param}` ? {[k in Param]: string} : {};
What it means

The meme contrasts ESLint warning against nested ternary expressions with TypeScript code that uses several deeply nested conditional types. The many-armed person represents TypeScript enthusiastically ignoring the warning while writing increasingly complex type logic. It is used as a reaction to clever, overcomplicated, or excessively type-heavy code.

Objects
Tags
Sources
Type
image
Size
593×800 · 75.7 KiB
Mood
саркастичный
Language
en
Added

Similar memes