From 0eda412e3e9b9f190d928be96c2254e0139046d8 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 10 Aug 2015 12:11:05 -0700 Subject: [PATCH] Adds testcase for #4004 --- tests/baselines/reference/amdReexportAmbientVar.js | 10 ++++++++++ .../baselines/reference/amdReexportAmbientVar.symbols | 11 +++++++++++ tests/baselines/reference/amdReexportAmbientVar.types | 11 +++++++++++ tests/cases/compiler/amdReexportAmbientVar.ts | 5 +++++ 4 files changed, 37 insertions(+) create mode 100644 tests/baselines/reference/amdReexportAmbientVar.js create mode 100644 tests/baselines/reference/amdReexportAmbientVar.symbols create mode 100644 tests/baselines/reference/amdReexportAmbientVar.types create mode 100644 tests/cases/compiler/amdReexportAmbientVar.ts diff --git a/tests/baselines/reference/amdReexportAmbientVar.js b/tests/baselines/reference/amdReexportAmbientVar.js new file mode 100644 index 0000000000000..a44f75bda7b31 --- /dev/null +++ b/tests/baselines/reference/amdReexportAmbientVar.js @@ -0,0 +1,10 @@ +//// [amdReexportAmbientVar.ts] +/// +declare var view: string; +export {view}; +export function test() { } + +//// [amdReexportAmbientVar.js] +exports.view = view; +function test() { } +exports.test = test; diff --git a/tests/baselines/reference/amdReexportAmbientVar.symbols b/tests/baselines/reference/amdReexportAmbientVar.symbols new file mode 100644 index 0000000000000..b98d99283b61b --- /dev/null +++ b/tests/baselines/reference/amdReexportAmbientVar.symbols @@ -0,0 +1,11 @@ +=== tests/cases/compiler/amdReexportAmbientVar.ts === +/// +declare var view: string; +>view : Symbol(view, Decl(amdReexportAmbientVar.ts, 1, 11)) + +export {view}; +>view : Symbol(view, Decl(amdReexportAmbientVar.ts, 2, 8)) + +export function test() { } +>test : Symbol(test, Decl(amdReexportAmbientVar.ts, 2, 14)) + diff --git a/tests/baselines/reference/amdReexportAmbientVar.types b/tests/baselines/reference/amdReexportAmbientVar.types new file mode 100644 index 0000000000000..9adfc95c4e0e7 --- /dev/null +++ b/tests/baselines/reference/amdReexportAmbientVar.types @@ -0,0 +1,11 @@ +=== tests/cases/compiler/amdReexportAmbientVar.ts === +/// +declare var view: string; +>view : string + +export {view}; +>view : string + +export function test() { } +>test : () => void + diff --git a/tests/cases/compiler/amdReexportAmbientVar.ts b/tests/cases/compiler/amdReexportAmbientVar.ts new file mode 100644 index 0000000000000..45141037cb3de --- /dev/null +++ b/tests/cases/compiler/amdReexportAmbientVar.ts @@ -0,0 +1,5 @@ +//@module: commonjs +/// +declare var view: string; +export {view}; +export function test() { } \ No newline at end of file