unstale

npm / json-schema-to-typescript

json-schema-to-typescript

What changed in json-schema-to-typescript 16, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

6 breaking2 performance2 behavior and defaults1 tooling14 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

json-schema-to-typescript 1625 changes

Breaking changes 6

  • Relative references are resolved against each schema file's directory rather than process.cwd(); an explicit --cwd still takes precedence.

    16.0.0release notes

  • Draft-3 and Swagger 2 property-level required: true now causes the property to be emitted as required.

    16.0.0release notes

  • A named enum in a position with no name degrades to a union of literals instead of emitting a nameless enum declaration.

    16.0.0release notes

  • The JSON null value is treated as type: "null" instead of as an untyped object.

    16.0.0release notes

  • A root or untitled definition with an array type and properties now emits the union including non-object members, rather than making those members unreachable.

    16.0.0release notes

  • unreachableDefinitions now declares definitions even when declareExternallyReferenced is off.

    16.0.0release notes

Performance 2

  • compile() no longer scans every definition once per parsed node, making schemas with thousands of definitions compile much faster without changing generated output.

    16.0.0release notes

  • Formatting large, mostly quote-free outputs is several times faster; a caller's style.filepath still takes precedence.

    16.0.0release notes

Behavior and default changes 2

  • Short unions that fit on one line are no longer wrapped.

    16.0.0release notes

  • The description of an inline items schema is included in the array declaration's JSDoc as an Items paragraph.

    16.0.0release notes

Tooling 1

  • Generated type names can no longer start with a digit or collapse to an empty name.

    16.0.0release notes

Fixes and other changes 14

  • Members containing only unsupported keywords no longer add a stray {[k: string]: unknown} to the intersection.

    16.0.0release notes

  • With inferStringEnumKeysFromValues enabled, const is emitted as a literal type again rather than a single-member enum.

    16.0.0release notes

  • This option no longer produces invalid enum members for non-string, empty, or digit-leading values.

    16.0.0release notes

  • Nested array bounds are capped by their cumulative product against maxItems, falling back to an unbounded array rather than hanging or emitting enormous tuple unions.

    16.0.0release notes

  • OpenAPI 3.0 schemas with nullable: true, including those next to a $ref, now emit T | null.

    16.0.0release notes

  • Nested properties and patternProperties are now intersected with compound types instead of being dropped.

    16.0.0release notes

  • Multiple patternProperties, including with additionalProperties: false, are folded into one index signature typed as the union of their value types.

    16.0.0release notes

  • Index signatures from patternProperties or additionalProperties are widened to cover sibling named properties so the interface typechecks.

    16.0.0release notes

  • Recursive schemas reaching the generator without a name receive a generated type name instead of overflowing the stack.

    16.0.0release notes

  • Draft-07 named-anchor references matching a sibling $id are resolved instead of crashing.

    16.0.0release notes

  • References to definitions with dotted names now use the full name rather than truncating at the first dot.

    16.0.0release notes

  • A root-level reference to a definition that is itself only a reference no longer crashes.

    16.0.0release notes

  • Root-level references to definitions that refer back to themselves compile instead of crashing; the referenced definition remains emitted alongside the root type.

    16.0.0release notes

  • Piping a schema on stdin no longer prints a DEP0187 deprecation warning on Node 24.

    16.0.0release notes