diff --git a/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.errors.txt b/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.errors.txt index 6befffeee74..35fc45421c4 100644 --- a/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.errors.txt +++ b/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.errors.txt @@ -1,23 +1,19 @@ -tests/cases/compiler/test.ts(2,19): error TS2307: Cannot find module './foo2'. -tests/cases/compiler/test.ts(6,1): error TS2304: Cannot find name 'console'. -tests/cases/compiler/test.ts(7,1): error TS2304: Cannot find name 'console'. +tests/cases/compiler/test.ts(2,19): error TS2307: Cannot find module './missingModule'. -==== tests/cases/compiler/foo1.ts (0 errors) ==== +==== tests/cases/compiler/existingModule.ts (0 errors) ==== export var x = 1; -==== tests/cases/compiler/test.ts (3 errors) ==== - import {x} from './foo1'; - import {foo} from './foo2'; - ~~~~~~~~ -!!! error TS2307: Cannot find module './foo2'. +==== tests/cases/compiler/test.ts (1 errors) ==== + import {x} from './existingModule'; + import {foo} from './missingModule'; + ~~~~~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module './missingModule'. + + declare function use(a: any): void; const test = { x, foo }; - console.log(x); - ~~~~~~~ -!!! error TS2304: Cannot find name 'console'. - console.log(foo); - ~~~~~~~ -!!! error TS2304: Cannot find name 'console'. \ No newline at end of file + use(x); + use(foo); \ No newline at end of file diff --git a/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.js b/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.js index 2865f244fc8..1cb7fc677cd 100644 --- a/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.js +++ b/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.js @@ -1,23 +1,25 @@ //// [tests/cases/compiler/shorthandPropertyAssignmentInES6Module.ts] //// -//// [foo1.ts] +//// [existingModule.ts] export var x = 1; //// [test.ts] -import {x} from './foo1'; -import {foo} from './foo2'; +import {x} from './existingModule'; +import {foo} from './missingModule'; + +declare function use(a: any): void; const test = { x, foo }; -console.log(x); -console.log(foo); +use(x); +use(foo); -//// [foo1.js] +//// [existingModule.js] exports.x = 1; //// [test.js] -var foo1_1 = require('./foo1'); -var foo2_1 = require('./foo2'); -const test = { x: foo1_1.x, foo: foo2_1.foo }; -console.log(foo1_1.x); -console.log(foo2_1.foo); +var existingModule_1 = require('./existingModule'); +var missingModule_1 = require('./missingModule'); +const test = { x: existingModule_1.x, foo: missingModule_1.foo }; +use(existingModule_1.x); +use(missingModule_1.foo); diff --git a/tests/cases/compiler/shorthandPropertyAssignmentInES6Module.ts b/tests/cases/compiler/shorthandPropertyAssignmentInES6Module.ts index 50e2d2cf99c..8b08fd64e3e 100644 --- a/tests/cases/compiler/shorthandPropertyAssignmentInES6Module.ts +++ b/tests/cases/compiler/shorthandPropertyAssignmentInES6Module.ts @@ -1,14 +1,16 @@ // @target: ES6 // @module: commonjs -// @filename: foo1.ts +// @filename: existingModule.ts export var x = 1; // @filename: test.ts -import {x} from './foo1'; -import {foo} from './foo2'; +import {x} from './existingModule'; +import {foo} from './missingModule'; + +declare function use(a: any): void; const test = { x, foo }; -console.log(x); -console.log(foo); \ No newline at end of file +use(x); +use(foo); \ No newline at end of file