addressed PR feedback

This commit is contained in:
Vladimir Matveev 2015-11-09 13:56:18 -08:00
parent 6f08e89455
commit fe770bdd75
3 changed files with 31 additions and 31 deletions

View File

@ -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'.
use(x);
use(foo);

View File

@ -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);

View File

@ -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);
use(x);
use(foo);