主页
TypeScript
TypeScript 实用工具类型
demo_utility_types_exclude
运行 ❯
×
更改方向
保存代码
更改主题
type Primitive = string | number | boolean; const value: Exclude
= true; // a string cannot be used here since Exclude removed it from the type. console.log(typeof value);
boolean