fix(typescript): add experimentalDecorators = true to CompilerOptions

This commit is contained in:
Philipp Kunz 2018-07-09 00:00:07 +02:00
parent c603ae0c87
commit 7e8fe1bcba
3 changed files with 7 additions and 4 deletions

3
dist/index.js vendored
View File

@ -6,6 +6,7 @@ const defaultTsNodeOptions = {
compilerOptions: { compilerOptions: {
lib: ['es2016', 'es2017'], lib: ['es2016', 'es2017'],
target: 'es2015', target: 'es2015',
experimentalDecorators: true
}, },
skipIgnore: true, skipIgnore: true,
cacheDirectory: path.join(__dirname, '../tscache') cacheDirectory: path.join(__dirname, '../tscache')
@ -22,4 +23,4 @@ if (process.env.CLI_CALL_TSRUN) {
const pathToLoad = path.join(process.cwd(), pathToTsFile); const pathToLoad = path.join(process.cwd(), pathToTsFile);
Promise.resolve().then(() => require(pathToLoad)); Promise.resolve().then(() => require(pathToLoad));
} }
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDZCQUE2QjtBQUM3QixrQ0FBa0M7QUFFbEMsTUFBTSxvQkFBb0IsR0FBbUI7SUFDM0MsZUFBZSxFQUFFO1FBQ2YsR0FBRyxFQUFFLENBQUMsUUFBUSxFQUFDLFFBQVEsQ0FBQztRQUN4QixNQUFNLEVBQUUsUUFBUTtLQUNqQjtJQUNELFVBQVUsRUFBRSxJQUFJO0lBQ2hCLGNBQWMsRUFBRSxJQUFJLENBQUMsSUFBSSxDQUFDLFNBQVMsRUFBRSxZQUFZLENBQUM7Q0FDbkQsQ0FBQTtBQUVELElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsV0FBVyxDQUFDLEVBQUU7SUFDdEMsb0JBQW9CLENBQUMsS0FBSyxHQUFHLEtBQUssQ0FBQztDQUNwQztBQUVELE1BQU0sQ0FBQyxRQUFRLENB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ENBQUMsR0FBRyxDQUFDLGNBQWMsRUFBRTtJQUM5Qix5QkFBeUI7SUFDekIscUNBQXFDO0lBQ3JDLHNDQUFzQztJQUN0QyxNQUFNLFlBQVksR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDO0lBRXJDLE1BQU0sVUFBVSxHQUFHLElBQUksQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLEdBQUcsRUFBRSxFQUFFLFlBQVksQ0FBQyxDQUFDO0lBQzFELHFDQUFPLFVBQVUsR0FBRTtDQUNwQiJ9

View File

@ -1,10 +1,12 @@
import * as path from 'path'; import * as path from 'path';
import * as tsNode from 'ts-node'; import * as tsNode from 'ts-node';
import { CompilerOptions } from 'typescript';
const defaultTsNodeOptions: tsNode.Options = { const defaultTsNodeOptions: tsNode.Options = {
compilerOptions: { compilerOptions: <CompilerOptions>{
lib: ['es2016', 'es2017'], lib: ['es2016', 'es2017'],
target: 'es2015' target: <any>'es2015', // Script Target should be a string -> 2 is for ES2015
experimentalDecorators: true
}, },
skipIgnore: true, skipIgnore: true,
cacheDirectory: path.join(__dirname, '../tscache') cacheDirectory: path.join(__dirname, '../tscache')