rollup-plugin-add-global-ts
TypeScript icon, indicating that this package has built-in type declarations

2.3.0 • Public • Published

English | 简体中文

rollup-plugin-add-global-ts

NPM version NPM Weekly Downloads License

typescript will not add the types in the global declarations of the project to the compiled declaration file when it is compiled, so that projects with global declarations lose some of their declarations when they are compiled, which may result in errors when other projects refer to them.

This plugin adds the contents of the globally declared d.ts file to the compiled d.ts file at the end of the rollup compilation

Example

import addGlobalTs from 'rollup-plugin-add-global-ts'

export default [
  {
    // pass in an array of corresponding d.ts file paths to the function addGlobalTs
    plugins: [addGlobalTs(['src/typings.d.ts'])],
  },
]

Package Sidebar

Install

npm i rollup-plugin-add-global-ts

Weekly Downloads

24

Version

2.3.0

License

MIT

Unpacked Size

8.16 kB

Total Files

5

Last publish

Collaborators

  • gintamamadao