diff --git a/README.md b/README.md index ea05184..493175f 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ It is possible to configure the require extension upon initialization: targetES5: true, exitOnError: true, emitOnError: true + cliOptions: ['--skipLibCheck'] }); ### nodeLib [boolean] default: false @@ -79,6 +80,10 @@ The directory underneath which output files should be placed Tells the TypeScript compiler whether or not to emit JS files if an error occurs. +### emitOnError [string[]] default: [] + +Will be appended to the tsc command line options. + # Module Dependencies in TS files You can load any other TypeScript or Javascript module from your typescripts. However, you should diff --git a/index.js b/index.js index 4228120..d1c239b 100644 --- a/index.js +++ b/index.js @@ -20,6 +20,7 @@ var options = { exitOnError: true, tmpDir: path.join(process.cwd(), "tmp"), lib: ["DOM", "ScriptHost", "ES5", "ES6", "ES7", "esnext"], + cliOptions: [], }; module.exports = function (opts) { @@ -79,6 +80,7 @@ function compileTS(module) { "--lib", Array.isArray(options.lib) ? options.lib.join(",") : options.lib, module.filename, + ...options.cliOptions, ]; var proc = merge(merge({}, process), {