-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for variable declarations with binding patterns
Fixes #315
- Loading branch information
Showing
9 changed files
with
45 additions
and
10 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
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
4 changes: 4 additions & 0 deletions
4
tests/e2e/test-cases/binding-patterns-without-initializer/array-const.d.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,4 @@ | ||
export const [ | ||
FOO = '321', | ||
BAR = 1337, | ||
]; |
5 changes: 5 additions & 0 deletions
5
tests/e2e/test-cases/binding-patterns-without-initializer/config.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,5 @@ | ||
import { TestCaseConfig } from '../test-case-config'; | ||
|
||
const config: TestCaseConfig = {}; | ||
|
||
export = config; |
1 change: 1 addition & 0 deletions
1
tests/e2e/test-cases/binding-patterns-without-initializer/index.spec.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 @@ | ||
require('../run-test-case').runTestCase(__dirname); |
5 changes: 5 additions & 0 deletions
5
tests/e2e/test-cases/binding-patterns-without-initializer/input.d.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,5 @@ | ||
import { BAR as ARR_BAR, FOO as ARR_FOO } from './array-const'; | ||
import { BAR as OBJ_BAR, FOO as OBJ_FOO } from './obj-const'; | ||
|
||
export type BarType = typeof ARR_BAR | typeof OBJ_BAR; | ||
export type FooType = typeof ARR_FOO | typeof OBJ_FOO; |
4 changes: 4 additions & 0 deletions
4
tests/e2e/test-cases/binding-patterns-without-initializer/obj-const.d.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,4 @@ | ||
export declare const { | ||
FOO = 123, | ||
BAR = 42, | ||
}; |
6 changes: 6 additions & 0 deletions
6
tests/e2e/test-cases/binding-patterns-without-initializer/output.d.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,6 @@ | ||
declare const [FOO = "321", BAR = 1337,]; | ||
declare const { FOO$1 = 123, BAR$1 = 42, }; | ||
export type BarType = typeof BAR | typeof BAR$1; | ||
export type FooType = typeof FOO | typeof FOO$1; | ||
|
||
export {}; |