Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

Overriding TypeScript version #4

Closed
pkozlowski-opensource opened this issue Nov 20, 2015 · 3 comments
Closed

Overriding TypeScript version #4

pkozlowski-opensource opened this issue Nov 20, 2015 · 3 comments
Labels

Comments

@pkozlowski-opensource
Copy link
Contributor

Docs are stating that TS version used by this plugin can be easily overridden giving this code snippet as an example:

import typescript from 'rollup-plugin-typescript';
import * as ts from 'typescript';

export default {
  entry: 'main.ts',

  plugins: [
    typescript({
      target: ts.ScriptTarget.ES6
      sourceMap: true
    })
  ]
}

Is importing import * as ts from 'typescript'; enough to override tsc version? If so, what kind of node black magic would be involved here? I've played with this locally and couldn't override TS version.

Is there are clever trick at play here or is the override option missing from the impl?

@Victorystick
Copy link
Contributor

Only the target ECMAScript version can be overridden. The tsc version is currently an 1.7.0 beta I got from npm. Do you want to use a later version?

@pkozlowski-opensource
Copy link
Contributor Author

The tsc version is currently an 1.7.0 beta I got from npm. Do you want to use a later version?

Yes. I'm hitting some TS bugs with the tsc version bundled with rollup-plugin-typescript and would like to be able to switch between / use a particular TS version. Something along the lines of what is possible with the gulp-typescript plugin: https://github.com/ivogabe/gulp-typescript#typescript-version

I can send a PR of this makes sense

@Victorystick
Copy link
Contributor

Oh, I see. Yes, that's probably a good idea. A PR would be lovely. 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants