From: Anthony Fu Date: Wed, 1 Feb 2023 08:15:51 +0000 (+0100) Subject: fix(types): accept sync `serverPrefetch()` (#7000) X-Git-Tag: v3.2.46~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f1883ec53547d0847e1270f5a8fb0c46396fb07;p=thirdparty%2Fvuejs%2Fcore.git fix(types): accept sync `serverPrefetch()` (#7000) --- diff --git a/packages/runtime-core/src/componentOptions.ts b/packages/runtime-core/src/componentOptions.ts index 2e15b17dfe..d0009a9f4e 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