From 1c7de26467724af5ced963bb62ec40eb453f61c3 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Tue, 1 Nov 2022 14:37:40 +0800 Subject: [PATCH] fix(types): accept sync `serverPrefetch()` --- packages/runtime-core/src/componentOptions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-core/src/componentOptions.ts b/packages/runtime-core/src/componentOptions.ts index 36ba0d5166a..8ae13b013fa 100644 --- a/packages/runtime-core/src/componentOptions.ts +++ b/packages/runtime-core/src/componentOptions.ts @@ -147,7 +147,7 @@ export interface ComponentOptionsBase< emits?: (E | EE[]) & ThisType // TODO infer public instance type based on exposed keys expose?: string[] - serverPrefetch?(): Promise + serverPrefetch?(): void | Promise // Runtime compiler only ----------------------------------------------------- compilerOptions?: RuntimeCompilerOptions