摘要:
题目 中文 给定一个只包含字符串类型的元组类型T和一个类型 U, 递归地构建一个对象. English Given a tuple type T that only contains string type, and a type U, build an object recursively. ty 阅读全文
posted @ 2022-09-22 21:31
Laggage
阅读(46)
评论(0)
推荐(0)
摘要:
题目 中文 实现 Object.entries 的类型版本 示例: interface Model { name: string; age: number; locations: string[] | null; } type modelEntries = ObjectEntries<Model>; 阅读全文
posted @ 2022-09-22 21:12
Laggage
阅读(118)
评论(0)
推荐(0)
摘要:
题目 中文 从T中选出一组无法分配给U的属性 示例: type OmitBoolean = OmitByType< { name: string; count: number; isReadonly: boolean; isEnable: boolean; }, boolean >; // { na 阅读全文
posted @ 2022-09-22 20:45
Laggage
阅读(43)
评论(0)
推荐(0)
摘要:
题目 中文 实现一个通用的类型 Mutable<T>,使类型 T 的全部属性可变(非只读)。 例如: interface Todo { readonly title: string; readonly description: string; readonly completed: boolean; 阅读全文
posted @ 2022-09-22 02:24
Laggage
阅读(112)
评论(0)
推荐(0)
浙公网安备 33010602011771号