This repository has been archived by the owner on Sep 17, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: properly handle esm exports when file has imports too
- Loading branch information
1 parent
a1b2d83
commit 2f0cadf
Showing
15 changed files
with
140 additions
and
10 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
fixtures/typescript/export-class-declaration-with-imports/output.json
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,9 @@ | ||
{ | ||
"kind": "class", | ||
"methods": [ | ||
{ | ||
"name": "foo", | ||
"lineno": 4 | ||
} | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
fixtures/typescript/export-class-declaration-with-imports/source.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,9 @@ | ||
import 'typescript' | ||
|
||
export default class UserController { | ||
public foo () { | ||
return this.bar() | ||
} | ||
|
||
private bar () {} | ||
} |
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,9 @@ | ||
{ | ||
"kind": "class", | ||
"methods": [ | ||
{ | ||
"name": "foo", | ||
"lineno": 2 | ||
} | ||
] | ||
} |
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 @@ | ||
export default class UserController { | ||
public foo () { | ||
return this.bar() | ||
} | ||
|
||
private bar () {} | ||
} |
9 changes: 9 additions & 0 deletions
9
fixtures/typescript/export-class-variable-declaration-with-imports/output.json
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,9 @@ | ||
{ | ||
"kind": "class", | ||
"methods": [ | ||
{ | ||
"name": "foo", | ||
"lineno": 4 | ||
} | ||
] | ||
} |
11 changes: 11 additions & 0 deletions
11
fixtures/typescript/export-class-variable-declaration-with-imports/source.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,11 @@ | ||
import 'typescript' | ||
|
||
class UserController { | ||
public foo () { | ||
return this.bar() | ||
} | ||
|
||
private bar () {} | ||
} | ||
|
||
export default UserController |
9 changes: 9 additions & 0 deletions
9
fixtures/typescript/export-object-literal-declaration-with-imports/output.json
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,9 @@ | ||
{ | ||
"kind": "object", | ||
"methods": [ | ||
{ | ||
"name": "foo", | ||
"lineno": 4 | ||
} | ||
] | ||
} |
7 changes: 7 additions & 0 deletions
7
fixtures/typescript/export-object-literal-declaration-with-imports/source.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 @@ | ||
import 'typescript' | ||
|
||
const foo = { | ||
foo () {}, | ||
} | ||
|
||
export default foo |
9 changes: 9 additions & 0 deletions
9
fixtures/typescript/export-object-literal-declaration/output.json
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,9 @@ | ||
{ | ||
"kind": "object", | ||
"methods": [ | ||
{ | ||
"name": "foo", | ||
"lineno": 2 | ||
} | ||
] | ||
} |
4 changes: 4 additions & 0 deletions
4
fixtures/typescript/export-object-literal-declaration/source.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 @@ | ||
const foo = { | ||
foo () {}, | ||
} | ||
export default foo |
9 changes: 9 additions & 0 deletions
9
fixtures/typescript/export-object-literal-with-imports/output.json
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,9 @@ | ||
{ | ||
"kind": "object", | ||
"methods": [ | ||
{ | ||
"name": "foo", | ||
"lineno": 4 | ||
} | ||
] | ||
} |
5 changes: 5 additions & 0 deletions
5
fixtures/typescript/export-object-literal-with-imports/source.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 'typescript' | ||
|
||
export default { | ||
foo () {}, | ||
} |
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,9 @@ | ||
{ | ||
"kind": "object", | ||
"methods": [ | ||
{ | ||
"name": "foo", | ||
"lineno": 2 | ||
} | ||
] | ||
} |
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,3 @@ | ||
export default { | ||
foo () {}, | ||
} |
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