Revert "Print ; for module declaration and declare function" (#18852) (#19333)

This commit is contained in:
fisker Cheung authored and GitHub committed 2026-06-10 09:22:01 +08:00
1 parent 94c71e346f
commit 2eaad40bb2
9 files changed
+5 -203

No files matched your search

@@ -1,35 +0,0 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`no-semi.js - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["flow"]
semi: false
printWidth: 80 (default) |
=====================================input======================================
declare function foo():void;
{
foo
}
declare hook foo(): Foo;
{
foo
}
=====================================output=====================================
declare function foo(): void
{
foo
}
declare hook foo(): Foo
{
foo
}
================================================================================
`;
@@ -1 +0,0 @@
runFormatTest(import.meta, ["flow"], { semi: false });
-11
View File
@@ -1,11 +0,0 @@
declare function foo():void;
{
foo
}
declare hook foo(): Foo;
{
foo
}
@@ -1,44 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`functions.ts - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["typescript"]
semi: false
printWidth: 80 (default) |
=====================================input======================================
declare function a():void;
{
foo()
}
declare function b():void;
[foo()]
for(;;) function c();
{}
=====================================output=====================================
declare function a(): void;
{
foo()
}
declare function b(): void;
;[foo()]
for (;;) function c();
{
}
================================================================================
`;
exports[`index-signature.ts - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["typescript"]
@@ -92,48 +53,6 @@ interface InlineMultiple {
================================================================================
`;
exports[`module-declaration.ts - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["typescript"]
semi: false
printWidth: 80 (default) |
=====================================input======================================
declare module "foo";
{
foo()
}
declare module "bar" {};
{
foo()
}
declare module "baz";
[foo()]
=====================================output=====================================
declare module "foo";
{
foo()
}
declare module "bar" {}
{
foo()
}
declare module "baz";
;[foo()]
================================================================================
`;
exports[`type.ts - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["typescript"]
@@ -1,14 +0,0 @@
declare function a():void;
{
foo()
}
declare function b():void;
[foo()]
for(;;) function c();
{}
@@ -1,15 +0,0 @@
declare module "foo";
{
foo()
}
declare module "bar" {};
{
foo()
}
declare module "baz";
[foo()]