nativescript-dev-typescript icon indicating copy to clipboard operation
nativescript-dev-typescript copied to clipboard

Add the ability to pass the --build option to tsc

Open jessecrossen opened this issue 7 years ago • 2 comments

I would like to use the --build option that ships with TypeScript 3+, but there seems to be no way to inject it into the tsc arguments list. I can think of two ways to implement this, either specifically for this argument by adding the following to compiler.js:

if (options.build) {
  nodeArgs.push('--build');
}

or more generally by allowing arbitrary arguments to be passed through:

if (options.args) {
  nodeArgs = nodeArgs.concat(options.args);
}

I'm happy to submit a PR if needed.

jessecrossen avatar Aug 16 '18 19:08 jessecrossen

Actually on closer inspection it looks like it still wouldn't be easy to pass these options in from the hook scripts in my project, so that might also need to be considered.

jessecrossen avatar Aug 16 '18 19:08 jessecrossen

Actually this is much more complex than I had thought. I'd still like the feature, but doubt I'm up to submitting an acceptable PR. Among other things, a clean solution will depend on this issue being resolved: https://github.com/Microsoft/TypeScript/issues/26147

jessecrossen avatar Aug 16 '18 20:08 jessecrossen