-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow line termination prior to the with keyword
- Loading branch information
1 parent
e4c7a6e
commit e2af355
Showing
5 changed files
with
83 additions
and
2 deletions.
There are no files selected for viewing
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
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,22 @@ | ||
//// [tests/cases/conformance/importAttributes/importAttributes8.ts] //// | ||
|
||
//// [a.ts] | ||
export default { | ||
a: "a", | ||
b: "b", | ||
1: "1", | ||
} | ||
|
||
//// [b.ts] | ||
import a from "./a" | ||
with { a: "a", "b": "b", 1: "1" }; // ok | ||
|
||
|
||
//// [a.js] | ||
export default { | ||
a: "a", | ||
b: "b", | ||
1: "1", | ||
}; | ||
//// [b.js] | ||
export {}; |
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,20 @@ | ||
//// [tests/cases/conformance/importAttributes/importAttributes8.ts] //// | ||
|
||
=== /a.ts === | ||
export default { | ||
a: "a", | ||
>a : Symbol(a, Decl(a.ts, 0, 16)) | ||
|
||
b: "b", | ||
>b : Symbol(b, Decl(a.ts, 1, 11)) | ||
|
||
1: "1", | ||
>1 : Symbol(1, Decl(a.ts, 2, 11)) | ||
} | ||
|
||
=== /b.ts === | ||
import a from "./a" | ||
>a : Symbol(a, Decl(b.ts, 0, 6)) | ||
|
||
with { a: "a", "b": "b", 1: "1" }; // ok | ||
|
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,26 @@ | ||
//// [tests/cases/conformance/importAttributes/importAttributes8.ts] //// | ||
|
||
=== /a.ts === | ||
export default { | ||
>{ a: "a", b: "b", 1: "1",} : { a: string; b: string; 1: string; } | ||
|
||
a: "a", | ||
>a : string | ||
>"a" : "a" | ||
|
||
b: "b", | ||
>b : string | ||
>"b" : "b" | ||
|
||
1: "1", | ||
>1 : string | ||
>"1" : "1" | ||
} | ||
|
||
=== /b.ts === | ||
import a from "./a" | ||
>a : { a: string; b: string; 1: string; } | ||
|
||
with { a: "a", "b": "b", 1: "1" }; // ok | ||
>a : error | ||
|
13 changes: 13 additions & 0 deletions
13
tests/cases/conformance/importAttributes/importAttributes8.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,13 @@ | ||
// @module: esnext | ||
// @lib: es2015 | ||
|
||
// @filename: /a.ts | ||
export default { | ||
a: "a", | ||
b: "b", | ||
1: "1", | ||
} | ||
|
||
// @filename: /b.ts | ||
import a from "./a" | ||
with { a: "a", "b": "b", 1: "1" }; // ok |