If the type T accepts type null, output type true, otherwise output type false.
null
如果类型 T 包含类型 null,则输出 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 accepts type
null, output type true, otherwise output type false.如果类型 T 包含类型
null,则输出 true,否则输出 false。