From d54094c6f7533a76c11c0bbb98148c62146f28e8 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 13 Jun 2016 23:33:36 -0700 Subject: [PATCH] Accepted baselines. --- ...fExportedEntity01_targetES2015_CommonJS.js | 21 +++++++++++++++++++ ...rtedEntity01_targetES2015_CommonJS.symbols | 13 ++++++++++++ ...portedEntity01_targetES2015_CommonJS.types | 15 +++++++++++++ ...ndOfExportedEntity02_targetES5_CommonJS.js | 21 +++++++++++++++++++ ...xportedEntity02_targetES5_CommonJS.symbols | 13 ++++++++++++ ...fExportedEntity02_targetES5_CommonJS.types | 15 +++++++++++++ 6 files changed, 98 insertions(+) create mode 100644 tests/baselines/reference/shorthandOfExportedEntity01_targetES2015_CommonJS.js create mode 100644 tests/baselines/reference/shorthandOfExportedEntity01_targetES2015_CommonJS.symbols create mode 100644 tests/baselines/reference/shorthandOfExportedEntity01_targetES2015_CommonJS.types create mode 100644 tests/baselines/reference/shorthandOfExportedEntity02_targetES5_CommonJS.js create mode 100644 tests/baselines/reference/shorthandOfExportedEntity02_targetES5_CommonJS.symbols create mode 100644 tests/baselines/reference/shorthandOfExportedEntity02_targetES5_CommonJS.types diff --git a/tests/baselines/reference/shorthandOfExportedEntity01_targetES2015_CommonJS.js b/tests/baselines/reference/shorthandOfExportedEntity01_targetES2015_CommonJS.js new file mode 100644 index 00000000000..dbbc72fead3 --- /dev/null +++ b/tests/baselines/reference/shorthandOfExportedEntity01_targetES2015_CommonJS.js @@ -0,0 +1,21 @@ +//// [shorthandOfExportedEntity01_targetES2015_CommonJS.ts] + +export const test = "test"; + +export function foo () { + const x = { test }; +} + + +//// [shorthandOfExportedEntity01_targetES2015_CommonJS.js] +"use strict"; +exports.test = "test"; +function foo() { + const x = { test }; +} +exports.foo = foo; + + +//// [shorthandOfExportedEntity01_targetES2015_CommonJS.d.ts] +export declare const test: string; +export declare function foo(): void; diff --git a/tests/baselines/reference/shorthandOfExportedEntity01_targetES2015_CommonJS.symbols b/tests/baselines/reference/shorthandOfExportedEntity01_targetES2015_CommonJS.symbols new file mode 100644 index 00000000000..341d40bc542 --- /dev/null +++ b/tests/baselines/reference/shorthandOfExportedEntity01_targetES2015_CommonJS.symbols @@ -0,0 +1,13 @@ +=== tests/cases/compiler/shorthandOfExportedEntity01_targetES2015_CommonJS.ts === + +export const test = "test"; +>test : Symbol(test, Decl(shorthandOfExportedEntity01_targetES2015_CommonJS.ts, 1, 12)) + +export function foo () { +>foo : Symbol(foo, Decl(shorthandOfExportedEntity01_targetES2015_CommonJS.ts, 1, 27)) + + const x = { test }; +>x : Symbol(x, Decl(shorthandOfExportedEntity01_targetES2015_CommonJS.ts, 4, 7)) +>test : Symbol(test, Decl(shorthandOfExportedEntity01_targetES2015_CommonJS.ts, 4, 13)) +} + diff --git a/tests/baselines/reference/shorthandOfExportedEntity01_targetES2015_CommonJS.types b/tests/baselines/reference/shorthandOfExportedEntity01_targetES2015_CommonJS.types new file mode 100644 index 00000000000..dcc04015993 --- /dev/null +++ b/tests/baselines/reference/shorthandOfExportedEntity01_targetES2015_CommonJS.types @@ -0,0 +1,15 @@ +=== tests/cases/compiler/shorthandOfExportedEntity01_targetES2015_CommonJS.ts === + +export const test = "test"; +>test : string +>"test" : string + +export function foo () { +>foo : () => void + + const x = { test }; +>x : { test: string; } +>{ test } : { test: string; } +>test : string +} + diff --git a/tests/baselines/reference/shorthandOfExportedEntity02_targetES5_CommonJS.js b/tests/baselines/reference/shorthandOfExportedEntity02_targetES5_CommonJS.js new file mode 100644 index 00000000000..764739705c4 --- /dev/null +++ b/tests/baselines/reference/shorthandOfExportedEntity02_targetES5_CommonJS.js @@ -0,0 +1,21 @@ +//// [shorthandOfExportedEntity02_targetES5_CommonJS.ts] + +export const test = "test"; + +export function foo () { + const x = { test }; +} + + +//// [shorthandOfExportedEntity02_targetES5_CommonJS.js] +"use strict"; +exports.test = "test"; +function foo() { + var x = { test: exports.test }; +} +exports.foo = foo; + + +//// [shorthandOfExportedEntity02_targetES5_CommonJS.d.ts] +export declare const test: string; +export declare function foo(): void; diff --git a/tests/baselines/reference/shorthandOfExportedEntity02_targetES5_CommonJS.symbols b/tests/baselines/reference/shorthandOfExportedEntity02_targetES5_CommonJS.symbols new file mode 100644 index 00000000000..3b0b40922c9 --- /dev/null +++ b/tests/baselines/reference/shorthandOfExportedEntity02_targetES5_CommonJS.symbols @@ -0,0 +1,13 @@ +=== tests/cases/compiler/shorthandOfExportedEntity02_targetES5_CommonJS.ts === + +export const test = "test"; +>test : Symbol(test, Decl(shorthandOfExportedEntity02_targetES5_CommonJS.ts, 1, 12)) + +export function foo () { +>foo : Symbol(foo, Decl(shorthandOfExportedEntity02_targetES5_CommonJS.ts, 1, 27)) + + const x = { test }; +>x : Symbol(x, Decl(shorthandOfExportedEntity02_targetES5_CommonJS.ts, 4, 7)) +>test : Symbol(test, Decl(shorthandOfExportedEntity02_targetES5_CommonJS.ts, 4, 13)) +} + diff --git a/tests/baselines/reference/shorthandOfExportedEntity02_targetES5_CommonJS.types b/tests/baselines/reference/shorthandOfExportedEntity02_targetES5_CommonJS.types new file mode 100644 index 00000000000..27d16e2166f --- /dev/null +++ b/tests/baselines/reference/shorthandOfExportedEntity02_targetES5_CommonJS.types @@ -0,0 +1,15 @@ +=== tests/cases/compiler/shorthandOfExportedEntity02_targetES5_CommonJS.ts === + +export const test = "test"; +>test : string +>"test" : string + +export function foo () { +>foo : () => void + + const x = { test }; +>x : { test: string; } +>{ test } : { test: string; } +>test : string +} +