Print async keyword for component declarations (#19053)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
ff05f79437
commit
f86027197d
7 files changed
+74
-1
No files matched your search
@@ -72,6 +72,16 @@ component MyComponent(
|
||||
|
||||
component MyComponent() /* Trailing comment */ {}
|
||||
|
||||
async component MyAsyncComponent() {}
|
||||
|
||||
async component MyAsyncComponent() renders SomeComponent {}
|
||||
|
||||
async component MyAsyncComponent(bar: string, baz: number) {
|
||||
return <OtherComponent />;
|
||||
}
|
||||
|
||||
export async component MyExportedAsyncComponent() {}
|
||||
|
||||
=====================================output=====================================
|
||||
component MyComponent() {}
|
||||
|
||||
@@ -174,6 +184,16 @@ component MyComponent(
|
||||
|
||||
component MyComponent() /* Trailing comment */ {}
|
||||
|
||||
async component MyAsyncComponent() {}
|
||||
|
||||
async component MyAsyncComponent() renders SomeComponent {}
|
||||
|
||||
async component MyAsyncComponent(bar: string, baz: number) {
|
||||
return <OtherComponent />;
|
||||
}
|
||||
|
||||
export async component MyExportedAsyncComponent() {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
|
||||
@@ -64,3 +64,13 @@ component MyComponent(
|
||||
) {}
|
||||
|
||||
component MyComponent() /* Trailing comment */ {}
|
||||
|
||||
async component MyAsyncComponent() {}
|
||||
|
||||
async component MyAsyncComponent() renders SomeComponent {}
|
||||
|
||||
async component MyAsyncComponent(bar: string, baz: number) {
|
||||
return <OtherComponent />;
|
||||
}
|
||||
|
||||
export async component MyExportedAsyncComponent() {}
|
||||
@@ -297,6 +297,14 @@ hook useFoo14<
|
||||
T: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo,
|
||||
>(): any {};
|
||||
|
||||
async hook useAsyncFoo1() {}
|
||||
|
||||
export async hook useAsyncFoo2() {}
|
||||
|
||||
async hook useAsyncFoo3(): string {}
|
||||
|
||||
async hook useAsyncFoo4(foo: Foo, ...bar: Bar) {}
|
||||
|
||||
=====================================output=====================================
|
||||
hook useFoo1() {}
|
||||
|
||||
@@ -337,6 +345,14 @@ hook useFoo14<
|
||||
T: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo,
|
||||
>(): any {}
|
||||
|
||||
async hook useAsyncFoo1() {}
|
||||
|
||||
export async hook useAsyncFoo2() {}
|
||||
|
||||
async hook useAsyncFoo3(): string {}
|
||||
|
||||
async hook useAsyncFoo4(foo: Foo, ...bar: Bar) {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
|
||||
@@ -28,3 +28,11 @@ hook useFoo13(foo: Array<Foooooooooooooooooooooooooooooooooooooooooooooooooooooo
|
||||
hook useFoo14<
|
||||
T: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo,
|
||||
>(): any {};
|
||||
|
||||
async hook useAsyncFoo1() {}
|
||||
|
||||
export async hook useAsyncFoo2() {}
|
||||
|
||||
async hook useAsyncFoo3(): string {}
|
||||
|
||||
async hook useAsyncFoo4(foo: Foo, ...bar: Bar) {}
|
||||
Reference in new issue
Block a user