@nuxt/docs-nightly 4.3.0-29473767.8c01e1ce → 4.3.0-29473885.5385d4a8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -112,8 +112,6 @@ For example, you can define a custom handler utility that wraps the original han
|
|
|
112
112
|
**Example:**
|
|
113
113
|
|
|
114
114
|
```ts [server/utils/handler.ts]
|
|
115
|
-
import type { EventHandler, EventHandlerRequest } from 'h3'
|
|
116
|
-
|
|
117
115
|
export const defineWrappedResponseHandler = <T extends EventHandlerRequest, D> (
|
|
118
116
|
handler: EventHandler<T, D>,
|
|
119
117
|
): EventHandler<T, D> =>
|
|
@@ -129,6 +127,7 @@ export const defineWrappedResponseHandler = <T extends EventHandlerRequest, D> (
|
|
|
129
127
|
}
|
|
130
128
|
})
|
|
131
129
|
```
|
|
130
|
+
|
|
132
131
|
```ts [server/api/hello.get.ts]
|
|
133
132
|
export default defineWrappedResponseHandler(event => 'hello world')
|
|
134
133
|
```
|