feat(types): add nuxt error type (#5950)

This commit is contained in:
orblazer 2019-06-24 18:56:07 +02:00 committed by Pooya Parsa
parent e71954e330
commit 86d4613d9c
1 changed files with 4 additions and 3 deletions

View File

@ -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 {