mohd-akram / rollup-plugin-typescript

Third time's the charm.
https://www.npmjs.com/package/rollup-plugin-typescript3
MIT License
1 stars 0 forks source link

Getting Error: The keyword 'interface' is reserved #2

Open devin6391 opened 6 years ago

devin6391 commented 6 years ago

Hey guys,

I just upgraded to this plugin from rollup-plugin-typescript2 as I swtiched to typescript3. But now I am getting this error:

[!] Error: The keyword 'interface' is reserved
src\Slider\Slider.tsx (7:0)
5: import { ISliderChildStyles, ISliderDirection } from "./types";
6:
7: interface ISliderProps {
   ^
8:   watchProp: any; // The property to watch on which sliding will occur. This must be a literal value.
9:   childProps: any; // The properties of child element.`
mohd-akram commented 6 years ago

The other plugin should still work with TypeScript 3. This is just an alternate version because I had trouble with the other ones. It currently doesn't support .tsx files so that's probably why you're getting this error. I'll see if I can add support for it.

mohd-akram commented 6 years ago

I pushed a new version, try it out.

julienattias commented 3 years ago

I found a solution (using @rollup/plugin-typescript but still had the issue) by removing the following properties from the compilerOptions of the tsconfig.json.

{
  "compilerOptions": {
-     "outDir": "dist",
-     "declaration": true
  }
}
jack0wsky commented 2 years ago

But it looks like without those properties ts doesn't generate .d.ts files

BeezBeez commented 1 year ago

Any news ?