juandl/rollup-plugin-tsc-generator(opens in a new tab)
Language: TypeScript
Rollup plugin to generate typescript declarations using tsc native
- stars
- 2
- watchers
- 1
- forks
- 0
- open issues
- 0
- Last updated
- 07/24/2024
Language: TypeScript
Rollup plugin to generate typescript declarations using tsc native
A Rollup plugin designed to generate TypeScript types using the native tsc program. This plugin aims to improve performance by leveraging TypeScript's built-in type-checking and declaration file generation capabilities.
I was frustrated with the slow performance and lack of type-checking in existing plugins that generate TypeScript types. So, I created this plugin, which uses the native tsc (TypeScript) compiler and includes type-checking functionality.
You can install the plugin via npm:
npm install rollup-plugin-tsc-generator --save-dev
To use this plugin with Rollup, add it to your Rollup configuration:
import {tscGenerator} from 'rollup-plugin-tsc-generator'; export default { input: 'src/index.ts', output: { dir: 'dist', format: 'esm', }, plugins: [ tscGenerator({ dist: './dist', }), ], };
The tscGenerator function accepts a configuration object with the following options:
type tscGenerator = { dist?: string; // The folder where TypeScript declaration files will be generated. }