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

noproxy: true type mismatch #413

Open
unrealsolver opened this issue Sep 24, 2024 · 1 comment
Open

noproxy: true type mismatch #413

unrealsolver opened this issue Sep 24, 2024 · 1 comment

Comments

@unrealsolver
Copy link

When using .get with {noproxy: true} the return type stated as Immutable<S>, however should be just S.

get(options?: { noproxy?: boolean, stealth?: boolean }): Immutable<S>;

Due to the implementation details, it would be hard to write a conditional type here. Options are:

  • Create a .getBare or .getSource method or something similar, which would have noproxy behavior
  • Change options? to positional args with conditional types
@avkonst
Copy link
Owner

avkonst commented Sep 25, 2024

Well, technically it is immutable, because changing it would almost certainly be a bug...

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