实现一个通用的工具类型 PublicType<T> ,在 T 中将以 _ 开头的属性移除。
PublicType<T>
T
_
例如:
type Res = PublicType<{ a: 1, _b: 2 }> // expected to be { a: 1 }
TypeScript