dts-downlevel

0.4.0 • Public • Published

dts-downlevel

Remove TS 2.1 syntax from .d.ts files for backwards compatibility with TS 1.8

This utility modifies .d.ts files generated using TS 2.1. It removes any new syntax that is incompatible with TS 1.8.

This allows a library to be develped using TS 2.1, but consumed by an app that uses TS 1.8.

Get

npm i --save-dev dts-downlevel

Use

Command line use:

dts-downlevel [paths]

If [paths] is omitted, all .d.ts files in the current directory and below are modified.

Example

dts-downlevel 'dist/**/*.d.ts' 'build/**/*.d.ts'

Rules

To see the rules that this utility currently supports, view the source code: https://github.com/christopherthielen/dts-downlevel/blob/master/rules.js

Readme

Keywords

none

Package Sidebar

Install

npm i dts-downlevel

Weekly Downloads

53

Version

0.4.0

License

MIT

Unpacked Size

3.87 kB

Total Files

8

Last publish

Collaborators

  • christopherthielen