Public type

Medium
conditional types
template literal
infer
mapped types
key remapping

Description:

Implement util type PublicType<T> that removes the key starting with _ from given type T.

For example:

PublicType<{ _id: number, name: string }> // expected // { // name: string; // }

Code

Loading...