Skip to content

Error对象的类型定义是否有问题? #114

@WhiteYin

Description

@WhiteYin

源码

const onError = proxy.onError;

error = {config: xhr.config, error: error, type: errorType};
if (onError) {
  onError(error, handler);
} else {
  handler.next(error);
}

类型定义

interface XhrError {
  config: XhrRequestConfig,
  type: XhrErrorType
}

onError?: (err: XhrError, handler: XhrErrorHandler) => void,

XhrError少个error属性的类型声明

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions