npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rushstack/heft-json-schema-typings-plugin

v1.2.7

Published

A Heft plugin for generating TypeScript typings from JSON schema files.

Downloads

941

Readme

@rushstack/heft-json-schema-typings-plugin

This is a Heft plugin that generates TypeScript .d.ts typings from JSON Schema files (files matching *.schema.json). It uses the json-schema-to-typescript library to produce type declarations that can be imported alongside the schema at build time.

Setup

  1. Add the plugin as a devDependency of your project:

    rush add -p @rushstack/heft-json-schema-typings-plugin --dev
  2. Load the plugin in your project's heft.json configuration:

    {
      "$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft.schema.json",
      "phasesByName": {
        "build": {
          "tasksByName": {
            "json-schema-typings": {
              "taskPlugin": {
                "pluginPackage": "@rushstack/heft-json-schema-typings-plugin",
                "options": {
                  // (Optional) Defaults shown below
                  // "srcFolder": "src",
                  // "generatedTsFolders": ["temp/schemas-ts"],
                  // "formatWithPrettier": false
                }
              }
            }
          }
        }
      }
    }
  3. Place your *.schema.json files under the source folder (default: src/). The plugin will generate a corresponding .d.ts file for each schema.

Plugin options

| Option | Type | Default | Description | | -------------------- | ---------- | -------------------- | -------------------------------------------------------------------------------- | | srcFolder | string | "src" | Source directory to scan for *.schema.json files. | | generatedTsFolders | string[] | ["temp/schemas-ts"]| Output directories for the generated .d.ts files. | | formatWithPrettier | boolean | false | When true, format generated typings with prettier. Requires prettier as an installed dependency. |

Vendor extension: x-tsdoc-release-tag

The plugin recognises a custom vendor extension property called x-tsdoc-release-tag in your JSON Schema files. When present at the top level of a schema, its value (a TSDoc release tag such as @public, @beta, @alpha, or @internal) is injected into JSDoc comments of every exported declaration in the generated .d.ts file.

This is useful when the generated types are re-exported from a package entry point that is processed by API Extractor, which uses release tags to determine the API surface visibility.

Example

my-config.schema.json

{
  "x-tsdoc-release-tag": "@public",
  "title": "My Config",
  "type": "object",
  "properties": {
    "name": { "type": "string" }
  },
  "additionalProperties": false
}

Generated output (my-config.schema.json.d.ts)

/**
 * @public
 */
export interface MyConfig {
  name?: string;
}

The x-tsdoc-release-tag property is stripped from the schema before type generation, so it does not affect the shape of the emitted types. The value must be a single lowercase word starting with @ (for example @public or @beta); invalid values cause a build error.

Note: @rushstack/node-core-library's JsonSchema class accepts vendor extension keywords matching the x-<vendor>-<keyword> pattern by default, so schema files containing x-tsdoc-release-tag will validate without any additional configuration.

Links

  • CHANGELOG.md - Find out what's new in the latest version
  • @rushstack/heft - Heft is a config-driven toolchain that invokes popular tools such as TypeScript, ESLint, Jest, Webpack, and API Extractor.

Heft is part of the Rush Stack family of projects.