فهرست منبع

fix(types): accept sync `serverPrefetch()` (#7000)

Anthony Fu 3 سال پیش
والد
کامیت
5f1883ec53
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      packages/runtime-core/src/componentOptions.ts

+ 1 - 1
packages/runtime-core/src/componentOptions.ts

@@ -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