`);\r\n console.log(event.node.res.statusCode);\r\n });\r\n});\r\n```\r\n\r\nAnd I get the following typescript errors:\r\n\r\n- Argument of type '\"render:html\"' is not assignable to parameter of type 'HookKeys\u003CNitroRuntimeHooks>'.ts(2345)\r\n- Property 'head' does not exist on type 'Partial\u003CRenderResponse>'.ts(2339)\r\n\r\nLooking at `node_modules/nitropack/dist/runtime/types.d.ts`, it seems that `NitroRuntimeHooks` interface is missing `\"render:html\"` property\r\n\r\n\r\n\r\nIn order to resolve this issue, the `NitroRuntimeHooks` interface should be updated to include \"render:html\" property. (https://github.com/unjs/nitro/blob/main/src/runtime/types.ts#L23)\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n$ npx tsc\r\nserver/plugins/extend-html.ts:2:23 - error TS2345: Argument of type '\"render:html\"' is not assignable to parameter of type 'HookKeys\u003CNitroRuntimeHooks>'.\r\n\r\n2 nitroApp.hooks.hook(\"render:html\", (html, { event }) => {\r\n ~~~~~~~~~~~~~\r\n\r\nserver/plugins/extend-html.ts:3:10 - error TS2339: Property 'head' does not exist on type 'Partial\u003CRenderResponse>'.\r\n\r\n3 html.head.push(`\u003Cmeta name=\"author\" content=\"Paul Kim\" />`);\r\n ~~~~\r\n\r\n\r\nFound 2 errors in the same file, starting at: server/plugins/extend-html.ts:2\n```\n",[2955,2956],{"name":2917,"color":2918},{"name":2899,"color":2900},21708,"Typescript error when using Nitro plugin due to missing type for \"render:html\"","2023-07-07T10:28:31Z","https://github.com/nuxt/nuxt/issues/21708",0.69920814,{"description":2963,"labels":2964,"number":2970,"owner":2877,"repository":2877,"state":2925,"title":2971,"updated_at":2972,"url":2973,"score":2974},"### Environment\r\n\r\n- Operating System: Windows_NT\r\n- Node Version: v18.12.1\r\n- Nuxt Version: 3.5.3\r\n- Nitro Version: 2.5.0\r\n- Package Manager: npm@8.19.2\r\n- Builder: vite\r\n- User Config: ssr, telemetry, runtimeConfig, app, typescript, build, alias, vite, nitro, hooks, modules, routeRules, css, devtools, devServer\r\n- Runtime Modules: @nuxtjs/tailwindcss@6.8.0, @nuxtjs/i18n@8.0.0-beta.10, @nuxt/devtools@0.4.6\r\n\r\n### Reproduction\r\n\r\nUse the `render:html` hook from Nuxt inside a nitro plugin hook (like described in https://nuxt.com/docs/guide/going-further/hooks#usage-within-a-nitro-plugin) by creating a file with:\r\n`server/plugins/xyz.ts`\r\n```\r\nexport default defineNitroPlugin((nitroApp) => {\r\n nitroApp.hooks.hook('render:html', (html: NuxtRenderHTMLContext, { event }: { event: H3Event }) => {\r\n ^^^^^^^^^^^\r\n ...\r\n});\r\n```\r\n\r\n### Describe the bug\r\n\r\nAfter updating from Nuxt `3.5.1` to `3.5.3` TS is throwing:\r\n```\r\nerror TS2345: Argument of type '\"render:html\"' is not assignable to parameter of type 'HookKeys\u003CNitroRuntimeHooks>'.\r\n```\r\nThis is caused by the newly introduced typing with https://github.com/unjs/nitro/pull/1316/files#r1233083925\r\n\r\nNuxt is using custom hooks (like `render:html`) but there are not part of the typing (it is not extensible).\r\n\r\n### Additional context\r\n\r\nhttps://github.com/nuxt/nuxt/blob/71ef8bd3ff207fd51c2ca18d5a8c7140476780c7/packages/nuxt/src/core/runtime/nitro/renderer.ts#L228\r\n\r\n### Logs\r\n\r\n_No response_",[2965,2966,2967,2968,2969],{"name":2868,"color":2869},{"name":2917,"color":2918},{"name":2871,"color":2872},{"name":2905,"color":2906},{"name":2874,"color":2875},21693,"type error when using 'render:html' hook in nitro plugin","2023-06-23T13:30:57Z","https://github.com/nuxt/nuxt/issues/21693",0.7001382,{"description":2976,"labels":2977,"number":2985,"owner":2877,"repository":2877,"state":2925,"title":2986,"updated_at":2987,"url":2988,"score":2989},"### Environment\r\n\r\n- Operating System: `Darwin`\r\n- Node Version: `v20.10.0`\r\n- Nuxt Version: `3.8.0`\r\n- CLI Version: `3.9.1`\r\n- Nitro Version: `2.7.0`\r\n- Package Manager: `npm@8.19.4`\r\n- Builder: `-`\r\n- User Config: `app`, `extends`, `runtimeConfig`, `modules`, `vue`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n\r\n### Reproduction\r\n\r\nExecute the following client-side. It will throw a type error even though TypeScript is perfectly fine with such code.\r\n\r\n```ts\r\nconst event = useRequestEvent()\r\nconsole.log(event.property) // Type error. Reading property of undefined.\r\n```\r\n\r\n### Describe the bug\r\n\r\nThe helper function `useRequestEvent` may be executed seamlessly on both client and server sides. However, they do not return the same thing.\r\n\r\n- On the server, it returns a proper `H3Event` instance.\r\n- On the client, it returns `undefined`.\r\n\r\nHowever, its return type does not reflect that. [It's manually cast into `H3Event`](https://github.com/nuxt/nuxt/blob/44fcacba846a6cdf33e1475fc8413f6ae49d1fe4/packages/nuxt/src/app/composables/ssr.ts#L8-L10). \r\n\r\nThis forces the consumers to add a defensive layer if they want to be type-safe. Below is an example of such a layer.\r\n\r\n```ts\r\nconst event = useRequestEvent() as H3Event | undefined\r\n\r\nif (event) {\r\n // ...\r\n}\r\n```\r\n\r\nSuch boilerplate clutters the consumer code, and requires the `H3Event` type to be imported. Needless to say that it's also extremely easy to forget about such a defensive layer, and introduce type errors at runtime.\r\n\r\n### Additional context\r\n\r\n/\r\n\r\n### Logs\r\n\r\n```shell-script\r\n/\r\n```\r\n",[2978,2981,2982,2983,2984],{"name":2979,"color":2980},"good first issue","fbca04",{"name":2868,"color":2869},{"name":2917,"color":2918},{"name":2871,"color":2872},{"name":2874,"color":2875},25442,"`useRequestEvent` return type should be `H3Event | undefined`","2024-01-29T17:19:55Z","https://github.com/nuxt/nuxt/issues/25442",0.7053518,{"description":2991,"labels":2992,"number":2999,"owner":2877,"repository":2877,"state":2925,"title":3000,"updated_at":3001,"url":3002,"score":3003},"### Environment\n\n- Operating System: `Darwin`\r\n- Node Version: `v14.18.0`\r\n- Nuxt Version: `3.0.0-rc.11`\r\n- Nitro Version: `0.5.4`\r\n- Package Manager: `npm@6.14.15`\r\n- Builder: `vite`\r\n- User Config: `-`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n\n\n### Reproduction\n\nI created a simple implementation of a nitro plugin inside the server plugins. The types are all resolved to any: https://stackblitz.com/edit/github-xuiv1i?file=server%2Fplugins%2FNitroPlugin.ts\n\n### Describe the bug\n\nWhen creating a plugin inside `/server/plugins`, there are no types defined for `defineNitroPlugin`. In comparison if I'm using `defineNuxtPlugin`, it will be typed correctly.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2993,2994,2995,2998],{"name":2917,"color":2918},{"name":2920,"color":2921},{"name":2996,"color":2997},"dx","C39D69",{"name":2902,"color":2903},15088,"correct typings missing for `defineNitroPlugin` inside `server/plugins`","2024-12-19T17:37:39Z","https://github.com/nuxt/nuxt/issues/15088",0.71046704,["Reactive",3005],{},["Set"],["ShallowReactive",3008],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fiHWWWS18OJgLsOxSaQiaTJJONnYvF61mBJaJ6GC1lXQ":-1},"/nuxt/nuxt/23478"]