# @jjjzen/plugin-schema-to-typescript-dts

> build typescript definition (`*.d.ts`) from `*.schema.json`.

Latest version **0.0.3** (published 2021-06-09) · CC-BY-NC-ND-4.0 license · 0 weekly downloads

## Install

```sh
npm install @jjjzen/plugin-schema-to-typescript-dts
pnpm add @jjjzen/plugin-schema-to-typescript-dts
yarn add @jjjzen/plugin-schema-to-typescript-dts
bun add @jjjzen/plugin-schema-to-typescript-dts
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2021-06-09 |
| First published | 2021-06-09 |
| Weekly downloads | 0 |
| License | CC-BY-NC-ND-4.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | 14.17.0 |
| Dependencies | 10 |
| Unpacked size | 11.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Alban Minassian |
| Maintainers | ami44 |
| Keywords | jjjzen, plugin, typescript |

## Links

- npm: https://www.npmjs.com/package/@jjjzen/plugin-schema-to-typescript-dts
- Repository: https://github.com/jjjzen/jjjzen-plugin-schema-to-typescript-dts
- Homepage: https://github.com/jjjzen/jjjzen-plugin-schema-to-typescript-dts#readme
- Issues: https://github.com/jjjzen/jjjzen-plugin-schema-to-typescript-dts/issues
- npm.io page: https://npm.io/package/@jjjzen/plugin-schema-to-typescript-dts

## Dependencies (10)

- [ajv](https://npm.io/package/ajv.md) 8.2.0
- [traverse](https://npm.io/package/traverse.md) 0.6.6
- [ajv-formats](https://npm.io/package/ajv-formats.md) 2.1.0
- [jijejo-node](https://npm.io/package/jijejo-node.md) 1.0.8
- [lodash.camelcase](https://npm.io/package/lodash.camelcase.md) 4.3.0
- [lodash.clonedeep](https://npm.io/package/lodash.clonedeep.md) 4.5.0
- [lodash.capitalize](https://npm.io/package/lodash.capitalize.md) 4.2.1
- [lodash.upperfirst](https://npm.io/package/lodash.upperfirst.md) 4.3.1
- [@jjjzen/schemas-common](https://npm.io/package/@jjjzen/schemas-common.md) 0.0.2
- [json-schema-to-typescript](https://npm.io/package/json-schema-to-typescript.md) 10.1.4

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2021-06-09
- 0.0.2 — 2021-06-09
- 0.0.1 — 2021-06-09

## README

# README

Build typescript definition (`*.d.ts`) from `*.schema.json`.

## install

```bash
cd /path/your/project
npm install --save-dev @jjjzen/jjjzen @jjjzen/plugin-schema-to-typescript-dts
```

## config

```bash
cd /path/your/project
vi .jjjzenrc.json
```

```json
{
  "search": { "schemas": { "pattern": [ "**/*.schema.json" ] } },
  "plugins": [
    {
      "name": "@jjjzen/plugin-schema-to-typescript-dts",
      "options": {}
    }
  ]
}
```

## build

```bash
cd /path/your/project
./node_modules/.bin/jjjzen
ls -al **/_build/*.d.ts
```

## Tip jsdoc usage

```js
/**
 * @typedef { import("./schemas/_build/xyz.in.schema").XyzInSchema } XyzInSchema 
 * @typedef { import("./schemas/_build/xyz.err.schema").XyzErrSchema } XyzErrSchema 
 * @typedef { import("./schemas/_build/xyz.out.schema").XyzOutSchema } XyzOutSchema 
 */

/**
 * @param { XyzInSchema } ajsonin 
 * @returns {Promise<(XyzOutSchema|XyzErrSchema)>}
 */

async function xyz(ajsonin) {
}
```

---
_Source: https://npm.io/package/@jjjzen/plugin-schema-to-typescript-dts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
