ts-type-forge
    Preparing search index...

    Type Alias JsonPrimitive

    JsonPrimitive: boolean | number | string | null

    Represents the primitive types allowed in JSON according to RFC 7159. JSON primitives are: boolean, number, string, and null. Note that undefined is not a valid JSON primitive.

    const jsonString: JsonPrimitive = "hello";     // ✓ valid
    const jsonNumber: JsonPrimitive = 42; // ✓ valid
    const jsonBoolean: JsonPrimitive = true; // ✓ valid
    const jsonNull: JsonPrimitive = null; // ✓ valid
    // const invalid: JsonPrimitive = undefined; // ✗ error