Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Loosen typings for nock host to string | Regexp | Url #73

Open
dan-barrett opened this issue Jul 16, 2020 · 0 comments
Open

Loosen typings for nock host to string | Regexp | Url #73

dan-barrett opened this issue Jul 16, 2020 · 0 comments

Comments

@dan-barrett
Copy link

export function nock(host: string, options: NockCallback | NockOptions, cb?: NockCallback) {

This library wraps nock in a very helpful way. However, in the above line of code, the type for the nock host is too restrictive. This should be changed from string to string | Regexp | Url, which is what the underlying nock constructor takes:

https://github.com/nock/nock/blob/749ec7f518078178c8080600494577073ee7a79a/types/index.d.ts#L11

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

No branches or pull requests

1 participant