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
1 changed files with 1 additions and 1 deletions

View File

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