json-schema-to-typescript-lite is a focused fork of json-schema-to-typescript, designed to compile JSON schemas into TypeScript typings with a significantly reduced dependency footprint. The current stable version is 15.0.0. This package emphasizes programmatic usage, foregoing CLI support and internal Prettier integrations for a leaner build. It achieves smaller bundle sizes by replacing heavy dependencies like `lodash` with `lodash-es` (bundled) and targets modern ESNext environments. It offers dual module support (ESM and CJS) and includes support for custom naming options, making it suitable for environments where bundle size and minimal dependencies are critical considerations.
npm install json-schema-to-typescript-liteVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage of `compile` to convert a JSON schema object into a TypeScript interface string, including common options.
Migrate any CLI usage to direct programmatic calls to the `compile` function within your build scripts or application.
Run Prettier as a separate step on the generated TypeScript output if custom formatting is necessary.
Review your project's dependencies and explicitly add any external libraries that were implicitly provided by the non-lite version.
Thoroughly test your schema compilation output when migrating from `json-schema-to-typescript` to `json-schema-to-typescript-lite`.
Ensure the package is installed: `npm install json-schema-to-typescript-lite` or `yarn add json-schema-to-typescript-lite`. Verify the import statement is `import { compile } from 'json-schema-to-typescript-lite';`.Review your JSON schema against the specification. Common issues include incorrect `type` definitions, missing `properties` or `items` for array/object types, or invalid keywords.
Ensure the first argument passed to `compile` is a valid, non-null JSON schema object.
No dependency data recorded yet.