fix: h3 CompatibilityEvent

This commit is contained in:
Mahdi Boomeri
2022-10-21 16:56:09 +03:30
parent 92747711c6
commit 4ed504e1e9
4 changed files with 9 additions and 9 deletions

View File

@@ -120,14 +120,14 @@ trpc-nuxt accepts the following options exposed under `~/server/trpc/index.ts`:
```ts
import * as trpc from '@trpc/server'
import type { inferAsyncReturnType } from '@trpc/server'
import type { CompatibilityEvent } from 'h3'
import type { H3Event } from 'h3'
import type { OnErrorPayload } from 'trpc-nuxt/api'
export const router = trpc.router<inferAsyncReturnType<typeof createContext>>()
// Optional
// https://trpc.io/docs/context
export const createContext = (event: CompatibilityEvent) => {
export const createContext = (event: H3Event) => {
// ...
return {
/** context data */