From 5f1883ec53547d0847e1270f5a8fb0c46396fb07 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Wed, 1 Feb 2023 09:15:51 +0100 Subject: [PATCH] fix(types): accept sync `serverPrefetch()` (#7000) --- 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 2e15b17dfec..d0009a9f4eb 100644 --- a/packages/runtime-core/src/componentOptions.ts +++ b/packages/runtime-core/src/componentOptions.ts @@ -149,7 +149,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