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

View File

@ -39,7 +39,7 @@ export interface Context {
res: ServerResponse res: ServerResponse
redirect(status: number, path: string, query?: Route['query']): void redirect(status: number, path: string, query?: Route['query']): void
redirect(path: string, query?: Route['query']): void redirect(path: string, query?: Route['query']): void
error(params: ErrorParams): void error(params: NuxtError): void
nuxtState: NuxtState nuxtState: NuxtState
beforeNuxtRender(fn: (params: { Components: VueRouter['getMatchedComponents'], nuxtState: NuxtState }) => void): void beforeNuxtRender(fn: (params: { Components: VueRouter['getMatchedComponents'], nuxtState: NuxtState }) => void): void
} }
@ -68,9 +68,10 @@ export interface Transition {
leaveCancelled?(el: HTMLElement): void leaveCancelled?(el: HTMLElement): void
} }
export interface ErrorParams { export interface NuxtError {
statusCode?: number
message?: string message?: string
path?: string
statusCode?: number
} }
export interface NuxtLoading extends Vue { export interface NuxtLoading extends Vue {