Re:TypeScript 4.1
by simplicitea on Friday November 20, 2020 @02:17AM
(#25158034)
Template literals... helllsss yesss, been waiting a long time for those suckers.
[ Parent
| on HN ]
Re:TypeScript 4.1
by simplicitea on Friday November 20, 2020 @08:48PM
(#25167251)
readability? who needs it when i can now say `this, but camel case and no nulls`
export type Camel<T> = { [K in keyof T as K extends string ? `${Uncapitalize<string & K>}` : K]: T[K] extends Record<any, any> ? Camel<Exclude<T[K], null>> : Exclude<T[K], null> }