Description
- Rollup Plugin Name: typescript
- Rollup Plugin Version: 2.0.1
Feature Use Case
Our current official TypeScript plugin is missing a few important features:
- Cannot generate type definitions
- Cannot handle emit-less types
- Cannot report typing errors
As we prepare to rewrite our plugins in TypeScript we should make sure that we offer a great plugin too.
Feature Proposal
There are many Rollup TypeScript plugins in the community and we want to incorporate them rather than re-inventing the wheel. Our plugin uses TypeScript's simple API that just removes types. Other plugins call the command line API or use TypeScript's more complex compiler API.
rollup-plugin-ts looks like the best option for us. It handles lots of edge cases and is well maintained. It's great that its well tested (with Ava too!), emits declaration files for each chunk, and properly emits type errors.
The plugin also has lots of extra features, so we may want to keep some core functionality and leave some of the additional features in the user-land plugin.
browserslist
can be used instead oftarget
.- Babel can be used instead of TypeScript. (Sucrase can also handle the use case of just stripping types with no checks.)
@wessberg, would you be interested or open to moving rollup-plugin-ts here? How do you think we should proceed?