mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 23:32:38 +00:00
feat(types): add nuxt error type (#5950)
This commit is contained in:
parent
e71954e330
commit
86d4613d9c
7
packages/vue-app/types/index.d.ts
vendored
7
packages/vue-app/types/index.d.ts
vendored
@ -39,7 +39,7 @@ export interface Context {
|
||||
res: ServerResponse
|
||||
redirect(status: number, path: string, query?: Route['query']): void
|
||||
redirect(path: string, query?: Route['query']): void
|
||||
error(params: ErrorParams): void
|
||||
error(params: NuxtError): void
|
||||
nuxtState: NuxtState
|
||||
beforeNuxtRender(fn: (params: { Components: VueRouter['getMatchedComponents'], nuxtState: NuxtState }) => void): void
|
||||
}
|
||||
@ -68,9 +68,10 @@ export interface Transition {
|
||||
leaveCancelled?(el: HTMLElement): void
|
||||
}
|
||||
|
||||
export interface ErrorParams {
|
||||
statusCode?: number
|
||||
export interface NuxtError {
|
||||
message?: string
|
||||
path?: string
|
||||
statusCode?: number
|
||||
}
|
||||
|
||||
export interface NuxtLoading extends Vue {
|
||||
|
Loading…
Reference in New Issue
Block a user