Sveltekitcookies type error

When I add following code
export const auth = betterAuth({
  // ... your config
  plugins: [sveltekitCookies(getRequestEvent)],
});

I get error
Argument of type '() => RequestEvent<Partial<Record<string, string>>, string | null>' is not assignable to parameter of type '() => Promise<RequestEvent<Partial<Record<string, string>>, string | null>>'.
  Type 'RequestEvent<Partial<Record<string, string>>, string | null>' is missing the following properties from type 'Promise<RequestEvent<Partial<Record<string, string>>, string | null>>': then, catch, finally, [Symbol.toStringTag]

How do I fix this error?
Was this page helpful?