Keep comment on the same line in property signature (#19688)
This commit is contained in:
1 parent
5a763f1525
commit
f5927d5199
7 files changed
+80
-21
No files matched your search
@@ -1,5 +1,31 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`comment.ts format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["typescript"]
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
interface A {
|
||||
[key: string]: /** Comment */
|
||||
B;
|
||||
}
|
||||
|
||||
interface A {
|
||||
[key: string]: /** Comment */ B;
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
interface A {
|
||||
[key: string]: /** Comment */ B;
|
||||
}
|
||||
|
||||
interface A {
|
||||
[key: string]: /** Comment */ B;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`index-signature.ts format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["typescript"]
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
interface A {
|
||||
[key: string]: /** Comment */
|
||||
B;
|
||||
}
|
||||
|
||||
interface A {
|
||||
[key: string]: /** Comment */ B;
|
||||
}
|
||||
+1
-2
@@ -42,8 +42,7 @@ interface A {
|
||||
}
|
||||
|
||||
interface A {
|
||||
property: /** Comment */
|
||||
B;
|
||||
property: /** Comment */ B;
|
||||
}
|
||||
|
||||
interface A {
|
||||
|
||||
Reference in new issue
Block a user