-
Notifications
You must be signed in to change notification settings - Fork 852
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
[Typescript] Options type is not exported #400
Comments
You could import the types like
but I concur that it would be better to export them directly from the module. However there are more problems with the new types. If you're using ES6 as target it fails with:
Importing them like below in types.ts it works. import * as express from 'express';
import * as http from 'http';
import * as httpProxy from 'http-proxy';
import * as net from 'net'; |
Ouch, this old decision of using default exports is biting me now... It:
Think it can be solved by:
@ghostd @bender316 Is the type issue a blocker for HPM functioning at all? |
I made a new version with the changes mentioned earlier. example usage: import { createProxyMiddleware, Options } from 'http-proxy-middleware'; Let me know if this works out |
Yes, works now for ES6. |
It works for me, thanks |
Published version @bender316 Thanks for reporting the issue! Hope it didn't cause too much inconvenience. |
Hi I'm not sure if this is relevant but webpack-dev-server is kicking up a fuss with 'node_modules/http-proxy-middleware/dist/index"' has no exported member 'Config'.' Here is my tsconfig:
|
Hi,
I used the @types/http-proxy-middleware which expord a
Config
type. When i upgrade to the last version of http-proxy-middleware, i have the following error with this code:Can you export the Options type in
index.d.ts
?Regards
The text was updated successfully, but these errors were encountered: