类型工具 NonNullable<Type> NonNullable<Type>用来从联合类型 Type 删除 null 类型和 undefined 类型,组成一个新类型返回,也就是返回 Type 的非空类型版本。 // string|number type T1 = NonNullable<string | number | undefined