playground-typescript-json-schema

Convert the exported types/interfaces in the Playground to JSON Schemas

Usage no npm install needed!

<script type="module">
  import playgroundTypescriptJsonSchema from 'https://cdn.skypack.dev/playground-typescript-json-schema';
</script>

README

TypeScript Playground Plugin

This plugin uses a custom build of YousefED/typescript-json-schema (at commit 20a03a2 to output the JSON schema version of your exported interfaces/types from the Playground editor.

Running this plugin

or

  • Open up the TypeScript Playground
  • Go the "Plugins" in the sidebar
  • Look for "Plugins from npm"
  • Add "playground-typescript-json-schema"
  • Reload the browser

Then it will show up as a tab in the sidebar.

Contributing

See CONTRIBUTING.md for the full details, however, TLDR:

git clone ...
yarn install
yarn start

Then tick the box for starting plugin development inside the TypeScript Playground.