Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
WhiteYin opened this issue Jul 14, 2023 · 1 comment
Open

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

WhiteYin opened this issue Jul 14, 2023 · 1 comment

Comments

@WhiteYin
Copy link

源码

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属性的类型声明

@cyfung1031
Copy link
Contributor

我覺得這個你可以直接提交PR吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants