Skip to content

Commit fe770bd

Browse files
committed
addressed PR feedback
1 parent 6f08e89 commit fe770bd

3 files changed

Lines changed: 31 additions & 31 deletions

File tree

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
1-
tests/cases/compiler/test.ts(2,19): error TS2307: Cannot find module './foo2'.
2-
tests/cases/compiler/test.ts(6,1): error TS2304: Cannot find name 'console'.
3-
tests/cases/compiler/test.ts(7,1): error TS2304: Cannot find name 'console'.
1+
tests/cases/compiler/test.ts(2,19): error TS2307: Cannot find module './missingModule'.
42

53

6-
==== tests/cases/compiler/foo1.ts (0 errors) ====
4+
==== tests/cases/compiler/existingModule.ts (0 errors) ====
75

86
export var x = 1;
97

10-
==== tests/cases/compiler/test.ts (3 errors) ====
11-
import {x} from './foo1';
12-
import {foo} from './foo2';
13-
~~~~~~~~
14-
!!! error TS2307: Cannot find module './foo2'.
8+
==== tests/cases/compiler/test.ts (1 errors) ====
9+
import {x} from './existingModule';
10+
import {foo} from './missingModule';
11+
~~~~~~~~~~~~~~~~~
12+
!!! error TS2307: Cannot find module './missingModule'.
13+
14+
declare function use(a: any): void;
1515

1616
const test = { x, foo };
1717

18-
console.log(x);
19-
~~~~~~~
20-
!!! error TS2304: Cannot find name 'console'.
21-
console.log(foo);
22-
~~~~~~~
23-
!!! error TS2304: Cannot find name 'console'.
18+
use(x);
19+
use(foo);
Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
//// [tests/cases/compiler/shorthandPropertyAssignmentInES6Module.ts] ////
22

3-
//// [foo1.ts]
3+
//// [existingModule.ts]
44

55
export var x = 1;
66

77
//// [test.ts]
8-
import {x} from './foo1';
9-
import {foo} from './foo2';
8+
import {x} from './existingModule';
9+
import {foo} from './missingModule';
10+
11+
declare function use(a: any): void;
1012

1113
const test = { x, foo };
1214

13-
console.log(x);
14-
console.log(foo);
15+
use(x);
16+
use(foo);
1517

16-
//// [foo1.js]
18+
//// [existingModule.js]
1719
exports.x = 1;
1820
//// [test.js]
19-
var foo1_1 = require('./foo1');
20-
var foo2_1 = require('./foo2');
21-
const test = { x: foo1_1.x, foo: foo2_1.foo };
22-
console.log(foo1_1.x);
23-
console.log(foo2_1.foo);
21+
var existingModule_1 = require('./existingModule');
22+
var missingModule_1 = require('./missingModule');
23+
const test = { x: existingModule_1.x, foo: missingModule_1.foo };
24+
use(existingModule_1.x);
25+
use(missingModule_1.foo);
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
// @target: ES6
22
// @module: commonjs
33

4-
// @filename: foo1.ts
4+
// @filename: existingModule.ts
55
export var x = 1;
66

77
// @filename: test.ts
8-
import {x} from './foo1';
9-
import {foo} from './foo2';
8+
import {x} from './existingModule';
9+
import {foo} from './missingModule';
10+
11+
declare function use(a: any): void;
1012

1113
const test = { x, foo };
1214

13-
console.log(x);
14-
console.log(foo);
15+
use(x);
16+
use(foo);

0 commit comments

Comments
 (0)