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

instanceof AjaxError no longer possible since 7.0.0-rc.0 #6269

Closed
OliverJAsh opened this issue Apr 27, 2021 · 2 comments
Closed

instanceof AjaxError no longer possible since 7.0.0-rc.0 #6269

OliverJAsh opened this issue Apr 27, 2021 · 2 comments

Comments

@OliverJAsh
Copy link
Contributor

OliverJAsh commented Apr 27, 2021

Bug Report

Current Behavior
In 7.0.0-beta.15 this did not error.

In 7.0.0-rc.0 and above, this results in an error.

import { AjaxError } from 'rxjs/ajax';
declare const error: unknown;
// Error:
// The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type.
error instanceof AjaxError;

Expected behavior
No error


I glanced at the changelog but nothing stood out: https://github.com/ReactiveX/rxjs/blob/master/CHANGELOG.md#700-rc0-2021-04-19.

@voliva
Copy link
Contributor

voliva commented Apr 27, 2021

I've found the source of this issue: AjaxErrorCtor signature is marked as @internal, and now the build step removes it.

I'll raise a PR now with a posible fix

@cartant
Copy link
Collaborator

cartant commented Apr 27, 2021

Closed by #6275

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

3 participants