devtypes - v2.0.0
    Preparing search index...

    Type Alias JSONSerializable<T>

    JSONSerializable: IsJSONSerializable<T> extends true ? T : never

    Loosely checks whether the type is serializable and returns T, otherwise never.

    Type Parameters

    • T

      Type to test

    Type guard logic is based on IsJSONSerializable.

    type A = JSONSerializable< { a: string; b: number[] } >;  // { a: string; b: number[] }
    type B = JSONSerializable< symbol >; // never