mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
docs: use ts for create-error example (#28411)
This commit is contained in:
parent
8840199e5f
commit
fbdf4f3465
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user