diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/config.test | 4 | ||||
-rw-r--r-- | tests/config.ts | 5 | ||||
-rw-r--r-- | tests/config.ts.out | 9 | ||||
-rw-r--r-- | tests/config.tsconfig.json | 7 |
4 files changed, 25 insertions, 0 deletions
diff --git a/tests/config.test b/tests/config.test new file mode 100644 index 000000000..ee811ab8b --- /dev/null +++ b/tests/config.test @@ -0,0 +1,4 @@ +args: --reload --config tests/config.tsconfig.json tests/config.ts +check_stderr: true +exit_code: 1 +output: tests/config.ts.out diff --git a/tests/config.ts b/tests/config.ts new file mode 100644 index 000000000..e08061e77 --- /dev/null +++ b/tests/config.ts @@ -0,0 +1,5 @@ +const map = new Map<string, { foo: string }>(); + +if (map.get("bar").foo) { + console.log("here"); +} diff --git a/tests/config.ts.out b/tests/config.ts.out new file mode 100644 index 000000000..e3ceb52bc --- /dev/null +++ b/tests/config.ts.out @@ -0,0 +1,9 @@ +Unsupported compiler options in "[WILDCARD]tests/config.tsconfig.json" + The following options were ignored: + module, target +Compiling file://[WILDCARD]tests/config.ts +[WILDCARD]tests/config.ts:3:5 - error TS2532: Object is possibly 'undefined'. + +3 if (map.get("bar").foo) { + ~~~~~~~~~~~~~~ + diff --git a/tests/config.tsconfig.json b/tests/config.tsconfig.json new file mode 100644 index 000000000..074d7ac0b --- /dev/null +++ b/tests/config.tsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "module": "amd", + "strict": true, + "target": "es5" + } +} |