Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kanchalai Tanglertsampan
committed
Jun 19, 2017
1 parent
15ef20d
commit 4875a27
Showing
7 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
tests/baselines/reference/importCallExpressionIncorrect1.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
tests/cases/conformance/dynamicImport/1.ts(2,1): error TS1109: Expression expected. | ||
|
||
|
||
==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== | ||
export function foo() { return "foo"; } | ||
|
||
==== tests/cases/conformance/dynamicImport/1.ts (1 errors) ==== | ||
import | ||
import { foo } from './0'; | ||
~~~~~~ | ||
!!! error TS1109: Expression expected. |
13 changes: 13 additions & 0 deletions
13
tests/baselines/reference/importCallExpressionIncorrect1.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//// [tests/cases/conformance/dynamicImport/importCallExpressionIncorrect1.ts] //// | ||
|
||
//// [0.ts] | ||
export function foo() { return "foo"; } | ||
|
||
//// [1.ts] | ||
import | ||
import { foo } from './0'; | ||
|
||
//// [0.js] | ||
export function foo() { return "foo"; } | ||
//// [1.js] | ||
import ; |
10 changes: 10 additions & 0 deletions
10
tests/baselines/reference/importCallExpressionIncorrect2.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
tests/cases/conformance/dynamicImport/1.ts(1,9): error TS1109: Expression expected. | ||
|
||
|
||
==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== | ||
export function foo() { return "foo"; } | ||
|
||
==== tests/cases/conformance/dynamicImport/1.ts (1 errors) ==== | ||
var x = import { foo } from './0'; | ||
~~~~~~ | ||
!!! error TS1109: Expression expected. |
12 changes: 12 additions & 0 deletions
12
tests/baselines/reference/importCallExpressionIncorrect2.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//// [tests/cases/conformance/dynamicImport/importCallExpressionIncorrect2.ts] //// | ||
|
||
//// [0.ts] | ||
export function foo() { return "foo"; } | ||
|
||
//// [1.ts] | ||
var x = import { foo } from './0'; | ||
|
||
//// [0.js] | ||
export function foo() { return "foo"; } | ||
//// [1.js] | ||
var x = ; |
8 changes: 8 additions & 0 deletions
8
tests/cases/conformance/dynamicImport/importCallExpressionIncorrect1.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// @module: esnext | ||
// @target: esnext | ||
// @filename: 0.ts | ||
export function foo() { return "foo"; } | ||
|
||
// @filename: 1.ts | ||
import | ||
import { foo } from './0'; |
7 changes: 7 additions & 0 deletions
7
tests/cases/conformance/dynamicImport/importCallExpressionIncorrect2.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// @module: esnext | ||
// @target: esnext | ||
// @filename: 0.ts | ||
export function foo() { return "foo"; } | ||
|
||
// @filename: 1.ts | ||
var x = import { foo } from './0'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/// <reference path="fourslash.ts"/> | ||
|
||
// @lib: es2015 | ||
|
||
// @Filename: ./foo.ts | ||
//// export function bar() { return 1; } | ||
|
||
// @Filename: ./0.ts | ||
//// /*1*/ | ||
//// import { bar } from "./foo" | ||
|
||
verify.numberOfErrorsInCurrentFile(0); | ||
goTo.marker("1"); | ||
edit.insert("import"); | ||
verify.numberOfErrorsInCurrentFile(1); |