Add test for comment in destructuring patterns (#19900)

This commit is contained in:
fisker Cheung authored and GitHub committed 2026-08-20 19:45:16 +08:00
1 parent 07b7a29f51
commit aaa71f4b0e
2 files changed
+54

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
const foo = forwardRef<any>(({
// foo
size,
// onClose,
// onOpen,
}: PopoverProps,
) => {})
export function Component({
prop,
// comment
}: Type) {
return div;
}
@@ -69,6 +69,46 @@ type D2 =
================================================================================
`;
exports[`11639.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80 (default) |
=====================================input======================================
const foo = forwardRef<any>(({
// foo
size,
// onClose,
// onOpen,
}: PopoverProps,
) => {})
export function Component({
prop,
// comment
}: Type) {
return div;
}
=====================================output=====================================
const foo = forwardRef<any>(
({
// foo
size,
// onClose,
// onOpen,
}: PopoverProps) => {},
);
export function Component({
prop,
// comment
}: Type) {
return div;
}
================================================================================
`;
exports[`11662.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]