Skip to content

UTS 类型:ErrorListener

错误处理器。详情可查阅onError

可调用函数

  • ErrorListener(ErrorListenerOptions): void

参数

名称类型说明
errorany捕获的错误对象。
typeNavigationFailureType导航失败类型。

返回值

void

UTS

ts
/**
 * `onError` 回调定义
 */
export type ErrorListener = (error: any) => void

/**
 * `onError` 守卫回调定义
 */
export type ErrorListenerOptions = {
    error?: any
    failure?: NavigationFailure
}

Released under the MIT License.