Support newer typescript
SnarkBoojum opened this issue ยท 6 comments
I wanted to package rollup-plugin-typescript in Debian, but the testsuite doesn't work. It might be due to the fact that we have typescript 2.7.2 (the latest) and this plugin knows about 1.8.9...
Could you support newer typescript?
Thanks
Snark on #debian-js
I agree, it's heavily outdated at this point. Why doesn't the plugin just declare typescript as a peer dependency?
However, in the meantime, take a look at the example shown in the readme:
typescript({
typescript: require('some-fork-of-typescript')
})
I don't have control on how rollup-plugin-typescript is used : I want it to just work! I'm a packager, not a developer...
I just tried requiring a new TS version using:
typescript({
typescript: require('typescript')
})
After npm install typescript
locally to install 2.7.2, and checked console.log(require('typescript'))
correctly logs 2.7.2. But setting the version this way doesn't seem to work.
For example, it claims static
is an unexpected token, which is definitely not the case in 2.7.
I don't think just changing the expected version is enough : the language itself evolves from version to version, so one needs to adapt to those changes...
Honestly, typescript
should not be a dependency
. It should be a peerDependency
.
There were already a few pull requests for updating the TypeScript support as well as changing it to a peerDependency
. Sadly there seems to be no activity. ๐