60. implement UndefinedToNull<T>
分享给更多人
-通过 / -执行
Following the coding question 176. undefined to null on BFE.dev,
please implement UndefinedToNull<T>
.
type A = UndefinedToNull<string> // stringtype B = UndefinedToNull<undefined> // nulltype C = UndefinedToNull<[undefined, null]> // [null, null]type D = UndefinedToNull<{ a: undefined, b: [1, undefined]}> // {a: null, b: [1, null]}