Documentation
    Preparing search index...

    Type Alias Primitive<T>

    Primitive: Equal<T, PrimitiveMain<T>> extends true ? T : PrimitiveMain<T>

    Converts a type to its JSON-serializable primitive form.

    Primitive<T> transforms types for JSON serialization: boxed primitives become primitives (Boolean→boolean), classes become plain objects with methods removed, Date becomes string & Format<"date-time">, and types with toJSON() use their return type. Native classes (except Date) and bigint become never as they're not JSON-serializable.

    Type Parameters

    • T

      Target type to convert

    Jeongho Nam - https://github.com/samchon

    Kyungsu Kang - https://github.com/kakasoo