gvergnaud / hotscript

A library of composable functions for the type-level! Transform your TypeScript types in any way you want using functions you already know.
3.38k stars 57 forks source link

feat(objects): ReadonlyDeep #69

Closed un4uthorized closed 1 year ago

un4uthorized commented 1 year ago

Makes all levels of a type readonly

   type T0 = Call<Objects.ReadonlyDeep, {a: 1; b: true }>; // { readonly a:1; readonly b: true}
   type T1 = Call<Objects.ReadonlyDeep, {a: 1; b: { c: true } }>; // { readonly a:1; readonly b: { readonly c: true } }

image

gvergnaud commented 1 year ago

Closing in favor of #72