📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

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

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

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

0.0.3
latest
Source
npm
Version published
Maintainers
1
Created
Source

README

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

install

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

config

cd /path/your/project
vi .jjjzenrc.json
{
  "search": { "schemas": { "pattern": [ "**/*.schema.json" ] } },
  "plugins": [
    {
      "name": "@jjjzen/plugin-schema-to-typescript-dts",
      "options": {}
    }
  ]
}

build

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

Tip jsdoc usage

/**
 * @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) {
}

Keywords

jjjzen

FAQs

Package last updated on 09 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts