#12114 added mapped types, including recursive mapped types. But as pointed out by @ahejlsberg
Note, however, that such types aren't particularly useful without some form of conditional type that makes it possible to limit the recursion to selected kinds of types.
typeprimitive=string|number|boolean|undefined|null;typeDeepReadonly<T>=Textendsprimitive ? T : DeepReadonlyObject<T>;typeDeepReadonlyObject<T>={readonly[PinkeyofT]: DeepReadonly<T[P]>;};I couldn't find an existing issue with a feature request.
Conditional mapping would greatly improve the ergonomics of libraries like Immutable.js.
#12114 added mapped types, including recursive mapped types. But as pointed out by @ahejlsberg
I couldn't find an existing issue with a feature request.
Conditional mapping would greatly improve the ergonomics of libraries like Immutable.js.