Open bgmort opened 1 year ago
No news from this PR? I've just upgraded to chai 5.x.x
And I need to install "@types/superagent" in devDependencies to be able to use this syntax in TS : chai.request.execute('http://localhost:8080') .get('/')
And I don't understand why I need to install this package.?
upgrading to chai 5 won't have caused that. you needed to install the superagent types with chai 4 too.
technically @types/superagent
should be a prod dependency, then you wouldn't need to install it manually. Though if we did that, non-typescript users would unnecessarily be pulling it down
Suppose I assign a type to an unresolved chai http request in Typescript. Chai doesn't export a type, so the type has to be imported from superagent, which breaks encapsulation. This PR exports a wrapper type so that requests can be typed without an explicit dependency on superagent.
Before:
After: