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

Commit

Permalink
fix: add support for experimentalDecorators and emitDecoratorMetadata…
Browse files Browse the repository at this point in the history
… from tsconfig.json

Add support for two additional ts flags from tsconfig.json.
  • Loading branch information
rustyconover committed Feb 1, 2020
1 parent 6c800f2 commit ef36c8b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ts-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export interface TSConfig {
outDir?: string;
target?: string;
esModuleInterop?: boolean;
experimentalDecorators?: boolean;
emitDecoratorMetadata?: boolean;
};
}

Expand Down Expand Up @@ -71,6 +73,8 @@ function registerTSNode(root: string) {
compilerOptions: {
esModuleInterop: tsconfig.compilerOptions.esModuleInterop,
target: tsconfig.compilerOptions.target || 'es2017',
experimentalDecorators: tsconfig.compilerOptions.experimentalDecorators || false,
emitDecoratorMetadata: tsconfig.compilerOptions.emitDecoratorMetadata || false,
module: 'commonjs',
sourceMap: true,
rootDirs,
Expand Down

0 comments on commit ef36c8b

Please sign in to comment.