From cccf70b192778b9a473d11c5674afb15b194276e Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 23 Jun 2016 10:51:07 -0700 Subject: [PATCH 1/2] Add failing test --- .../reference/umdGlobalMerge.errors.txt | 20 +++++++++++++++++++ tests/cases/compiler/umdGlobalMerge.ts | 14 +++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 tests/baselines/reference/umdGlobalMerge.errors.txt create mode 100644 tests/cases/compiler/umdGlobalMerge.ts diff --git a/tests/baselines/reference/umdGlobalMerge.errors.txt b/tests/baselines/reference/umdGlobalMerge.errors.txt new file mode 100644 index 0000000000000..eb4a116ef0981 --- /dev/null +++ b/tests/baselines/reference/umdGlobalMerge.errors.txt @@ -0,0 +1,20 @@ +tests/cases/compiler/b.d.ts(2,20): error TS2305: Module '"tests/cases/compiler/a".ns' has no exported member 'IFoo'. + + +==== tests/cases/compiler/a.d.ts (0 errors) ==== + export = ns; + + export as namespace ns; + + declare namespace ns { + export var x: number; + export interface IFoo { } + } + +==== tests/cases/compiler/b.d.ts (1 errors) ==== + declare namespace ns.something { + export var p: ns.IFoo; + ~~~~ +!!! error TS2305: Module '"tests/cases/compiler/a".ns' has no exported member 'IFoo'. + } + \ No newline at end of file diff --git a/tests/cases/compiler/umdGlobalMerge.ts b/tests/cases/compiler/umdGlobalMerge.ts new file mode 100644 index 0000000000000..1f42e2fda7145 --- /dev/null +++ b/tests/cases/compiler/umdGlobalMerge.ts @@ -0,0 +1,14 @@ +// @filename: a.d.ts +export = ns; + +export as namespace ns; + +declare namespace ns { + export var x: number; + export interface IFoo { } +} + +// @filename: b.d.ts +declare namespace ns.something { + export var p: ns.IFoo; +} From 22cac1aa49d66cb3b7de87ff00fd89439e505b62 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 18 Jul 2016 13:29:38 -0700 Subject: [PATCH 2/2] Provide the complete path to tsconfig file. Fixes #9785 --- src/compiler/tsc.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index e25ae37e21fa9..14806885296a0 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -385,7 +385,8 @@ namespace ts { sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); return; } - const configParseResult = parseJsonConfigFileContent(configObject, sys, getNormalizedAbsolutePath(getDirectoryPath(configFileName), sys.getCurrentDirectory()), commandLine.options, configFileName); + const cwd = sys.getCurrentDirectory(); + const configParseResult = parseJsonConfigFileContent(configObject, sys, getNormalizedAbsolutePath(getDirectoryPath(configFileName), cwd), commandLine.options, getNormalizedAbsolutePath(configFileName, cwd)); if (configParseResult.errors.length > 0) { reportDiagnostics(configParseResult.errors, /* compilerHost */ undefined); sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped);