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
1 parent
3dd529d
commit 54fb46d
Showing
5 changed files
with
67 additions
and
17 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
23 changes: 23 additions & 0 deletions
23
.../babel-plugin-proposal-decorators/test/fixtures/2023-05-classes--to-es2015/return/exec.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,23 @@ | ||
function decorateA(target) { | ||
return class extends target { | ||
a() { | ||
return "a"; | ||
} | ||
}; | ||
} | ||
|
||
function decorateB(target) { | ||
return class extends target { | ||
b() { | ||
return "b"; | ||
} | ||
}; | ||
} | ||
|
||
@decorateB | ||
@decorateA | ||
class Target {} | ||
|
||
const target = new Target(); | ||
expect(target.a()).toBe("a"); | ||
expect(target.b()).toBe("b"); |
23 changes: 23 additions & 0 deletions
23
packages/babel-plugin-proposal-decorators/test/fixtures/2023-05-classes/return/exec.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,23 @@ | ||
function decorateA(target) { | ||
return class extends target { | ||
a() { | ||
return "a"; | ||
} | ||
}; | ||
} | ||
|
||
function decorateB(target) { | ||
return class extends target { | ||
b() { | ||
return "b"; | ||
} | ||
}; | ||
} | ||
|
||
@decorateB | ||
@decorateA | ||
class Target {} | ||
|
||
const target = new Target(); | ||
expect(target.a()).toBe("a"); | ||
expect(target.b()).toBe("b"); |
File renamed without changes.