Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: avoid line breaks between class members head and key (#12653)
- Loading branch information
Showing
9 changed files
with
86 additions
and
0 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
23 changes: 23 additions & 0 deletions
23
...bel-generator/test/fixtures/decorators-legacy/ts-class-modifier-with-retainlines/input.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 @@ | ||
class A { | ||
@decorate | ||
public p = "p" | ||
|
||
@decorate | ||
public m() {} | ||
|
||
@decorate | ||
private set s | ||
(v) {} | ||
|
||
@decorate | ||
public [ | ||
cp | ||
] | ||
= "cp" | ||
|
||
@decorate | ||
private [ | ||
cm | ||
] | ||
() {} | ||
} |
1 change: 1 addition & 0 deletions
1
...generator/test/fixtures/decorators-legacy/ts-class-modifier-with-retainlines/options.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 @@ | ||
{ "plugins": ["classProperties", "decorators-legacy", "typescript"], "decoratorsBeforeExport": true, "retainLines": true } |
22 changes: 22 additions & 0 deletions
22
...el-generator/test/fixtures/decorators-legacy/ts-class-modifier-with-retainlines/output.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,22 @@ | ||
class A { | ||
@decorate | ||
public p = "p"; | ||
|
||
@decorate | ||
public m() {} | ||
|
||
@decorate | ||
private set s( | ||
v) {} | ||
|
||
@decorate | ||
|
||
public [cp] = | ||
|
||
"cp"; | ||
|
||
@decorate | ||
|
||
private [cm]() | ||
|
||
{}} |
7 changes: 7 additions & 0 deletions
7
packages/babel-generator/test/fixtures/decorators/accessor-with-retainlines/input.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 @@ | ||
class C { | ||
@dec | ||
get a() {} | ||
|
||
@dec | ||
set a(v) {} | ||
} |
8 changes: 8 additions & 0 deletions
8
packages/babel-generator/test/fixtures/decorators/accessor-with-retainlines/output.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,8 @@ | ||
class C { | ||
@dec | ||
get a() {} | ||
|
||
@dec | ||
set a(v) {} | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
packages/babel-generator/test/fixtures/decorators/async-method-with-retainlines/input.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,9 @@ | ||
class C { | ||
@dec | ||
async a() {} | ||
|
||
@dec | ||
async * | ||
a(v) {} | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
packages/babel-generator/test/fixtures/decorators/async-method-with-retainlines/output.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,8 @@ | ||
class C { | ||
@dec | ||
async a() {} | ||
|
||
@dec | ||
async *a(v) {} | ||
|
||
} |
File renamed without changes.