]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(types): accept sync `serverPrefetch()` (#7000)
authorAnthony Fu <anthonyfu117@hotmail.com>
Wed, 1 Feb 2023 08:15:51 +0000 (09:15 +0100)
committerGitHub <noreply@github.com>
Wed, 1 Feb 2023 08:15:51 +0000 (03:15 -0500)
packages/runtime-core/src/componentOptions.ts

index 2e15b17dfec8267e8f87078edc7611d8bcd22421..d0009a9f4eb2ff7aa3d4535b7b07e56c7161eec4 100644 (file)
@@ -149,7 +149,7 @@ export interface ComponentOptionsBase<
   emits?: (E | EE[]) & ThisType<void>
   // TODO infer public instance type based on exposed keys
   expose?: string[]
-  serverPrefetch?(): Promise<any>
+  serverPrefetch?(): void | Promise<any>
 
   // Runtime compiler only -----------------------------------------------------
   compilerOptions?: RuntimeCompilerOptions