mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
addressed PR feedback
This commit is contained in:
parent
6f08e89455
commit
fe770bdd75
@ -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);
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
Loading…
x
Reference in New Issue
Block a user