Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support default exported classes that extend other classes (#4950)
- Loading branch information
1 parent
bbce2b7
commit 2820962
Showing
4 changed files
with
27 additions
and
25 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
3 changes: 3 additions & 0 deletions
3
test/form/samples/default-export-anonymous-class-extends/_config.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,3 @@ | ||
module.exports = { | ||
description: 'handles default exported classes extending a regular expression argument (#4783)' | ||
}; |
7 changes: 7 additions & 0 deletions
7
test/form/samples/default-export-anonymous-class-extends/_expected.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,7 @@ | ||
function foo(val) { | ||
return val; | ||
} | ||
|
||
class main extends foo(/1/) {} | ||
|
||
export { main as default }; |
5 changes: 5 additions & 0 deletions
5
test/form/samples/default-export-anonymous-class-extends/main.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,5 @@ | ||
function foo(val) { | ||
return val; | ||
} | ||
|
||
export default class extends foo(/1/) {} |