Checks whether the type is serializable and returns T, otherwise never.
T
never
Type to test
Type guard logic is based on IsJSONSerializable.
type A = JSONSerializable< { a: string; b: number[] } >; // { a: string; b: number[] }type B = JSONSerializable< { a: string; b: undefined } >; // nevertype C = JSONSerializable< ()=>void >; // nevertype D = JSONSerializable< ( string | undefined )[] >; // never Copy
type A = JSONSerializable< { a: string; b: number[] } >; // { a: string; b: number[] }type B = JSONSerializable< { a: string; b: undefined } >; // nevertype C = JSONSerializable< ()=>void >; // nevertype D = JSONSerializable< ( string | undefined )[] >; // never
Checks whether the type is serializable and returns
T, otherwisenever.