JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 789
  • Score
    100M100P100Q92545F
  • License Apache-2.0

An always up-to-date tsconfig.json type, transformed from its JSON Schema Store definition

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tsconfig-type) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Tsconfig Type

    A tsconfig.json type, regularly regenerated based on the schemastore.org definition.

    Installation

    npm i tsconfig-type

    Usage

    import {Tsconfig} from "tsconfig-type";
    
    const tsconfig: Tsconfig = {
        // ...
    };

    Rationale

    I was trying to build a tool which would allow users to specify their TypeScript configuration in TypeScript (not JSON). To my dismay, I found no up-to-date type definition. One would think that such a type definition would be exposed from the typescript package itself, but it is not. Meanwhile hand-written definitions are prone to fall behind the latest TypeScript versions.

    This type is a response to (what I felt) was a lack of great options. tsconfig-type is regularly (on a weekly basis) regenerated from the latest JSON schema. First, the generation script fetches the JSON schema and runs it through json-schema-to-typescript. Next, that output undergoes a series of transforms. Finally, the resulting type is auto-published to NPM with a minor version increment. In this regard, this package does not strictly follow semver (I'd recommend pinning).