Skip to content
No description, website, or topics provided.
TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.semaphore
src
.editorconfig
.gitignore
.npmignore
.prettierrc.yaml
LICENSE
README.md
package.json
tsconfig.json
tslint.yaml
yarn.lock

README.md

ts-typesversions

Build Status Greenkeeper badge

A library for Typescript package authors to:

  • publish multiple type declaration files using the new typesVersions feature available in Typescript 3.1
  • determine the minimum Typescript version that a package is compatible with

Install

yarn add -D ts-typesversions

Usage

There are two primary intended uses for this project:

  1. As a CLI to check project compatibility with different Typescript versions
  2. Programmatically as part of an npm/yarn release process

CLI

yarn run ts-typesversions

This will invoke an interactive CLI where you can opt to:

  1. just check compilation compatibility with different versions of Typescript
  2. generate declaration files for different TS versions

For full usage instructions, run:

yarn run ts-typesversions --help

As Part of a Release Step

We suggest that you add yarn run ts-typesversions --declarations as part of the prepublishOnly step of the package publish lifecycle.

For example:

{
    "scripts": {
        "prepublishOnly": "rm -rf dist && tsc && yarn run ts-typesversions --declarations"
    }
}

To limit the supported versions to only a subset of Typescript releases you can supply the --ts-versions option.

yarn run ts-typesversions --declarations --ts-versions 3.1,3.0,2.9,2.8
You can’t perform that action at this time.