docs: use ts for create-error example (#28411)

This commit is contained in:
Sébastien Chopin 2024-08-05 17:33:39 +02:00 committed by GitHub
parent c906312034
commit 576c34efe9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,7 +41,7 @@ Use `createError` to trigger error handling in server API routes.
### Example ### Example
```js ```ts [server/api/error.ts]
export default eventHandler(() => { export default eventHandler(() => {
throw createError({ throw createError({
statusCode: 404, statusCode: 404,