13
|
Morgan Touverey Quilling · 技术社区 · 6 年前 |
1
22
更新,2018-08
引入TypeScript 2.8
此外,在TypeScript 2.9中,
原始答案,2018-03对 conditional types will enable this 虽然 you can get this behavior without them 也 其想法是从原始接口中提取属性,然后用新的属性替换它们。像这样:
编辑:我更改了
我想这是你想要的行为。希望有帮助;祝你好运 |
2
7
使用TypeScript Omit :
|
3
3
使用
避免
编辑:本会对此发表评论,但缺乏必要的声誉 |
4
1
简短回答:
|
5
0
我总是用这个来约会。我有一个公共库,用于后端和前端React应用程序,用于域特定实体的类型定义。
通过数据库接收数据时,日期字段为
|
Devmix · 如何在new Map()中保存状态? 1 年前 |
Luisus · 从Prisma 5客户端提取类型 1 年前 |
Rostys · TypeScript:使用类型转换进行类型保护 1 年前 |
Anne · 类型不一致的对象的TypeScript类型定义 1 年前 |
tuimui · 使用react+ts通过道具传递数据 1 年前 |