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

add interceptors to Scope type declaration #2300

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

calebTomlinson
Copy link

@calebTomlinson calebTomlinson commented Feb 4, 2022

Just a simple types update.

The motivation for wanting access to Scope.interceptors is to do this:

nock.removeInterceptor(nockScopeInstance.interceptors[0]);

Of course, I can make this work in typescript with as Interceptor, but I figured I'd push upstream.

Would there be a good reason nock doesn't want to expose interceptors in its public api?

Better yet, I'd really love to be able to call scopeInstance.cleanAll(), but that's another issue. Would you be open that as a feature 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

Successfully merging this pull request may close these issues.

None yet

1 participant