If the type T is a union type containing null (i.e. T is nullable), output type true, otherwise output type false.
null
T
如果类型 T 是包含类型 null 的联合类型(即 T 可为空),则输出 true,否则输出 false。
type A = IsNullable<string>;//=> falsetype B = IsNullable<string | null>;//=> true Copy
type A = IsNullable<string>;//=> falsetype B = IsNullable<string | null>;//=> true
If the type T is a union type containing
null(i.e.Tis nullable), output type true, otherwise output type false.如果类型 T 是包含类型
null的联合类型(即 T 可为空),则输出 true,否则输出 false。