-
Notifications
You must be signed in to change notification settings - Fork 19
Use @types instead of typings #106
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
Conversation
typings is not needed anymore
There's no rush to merge this as a breaking change - do you think we can get |
And thanks, by the way! It looks great 👍 |
I made a PR for the |
Done! |
package.json
Outdated
"@types/concat-stream": "^1.6.0", | ||
"@types/form-data": "0.0.33", | ||
"@types/methods": "^1.1.0", | ||
"@types/node": "^8.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move @types/node
to dev dependencies? Installing node
for people using the browser could cause issues.
1 similar comment
I wanted to merge this, but I also just realised that it does entirely break the browser use-case and it's impossible to resolve until TypeScript supports it. Why? Because |
Maybe internalize |
@unional The main issue is that we'd need to expose those types somehow, whether it's global or not. This works with Typings because I enabled browser resolution separate to main resolution (specifically for this use-case). Currently, I think the only work-around will be trying very hard to make sure only custom interfaces that implement both the browser and server side but expose neither specific features are exported. It's a fragile thing, but it might be the only way for now. |
Sorry, I misread There was a time I tried to do some browser-spec stuff, but I hit a wall related to webpack. It probably too much work to get a HCF of both interface... :) Any news on the browser-spec support? |
None. I wouldn't expect it to happen. I think I might take a stab at this interface some time next week (busy this week) unless someone else does it. That will be v10. Then v11 will be a much heavier refactor bring it up to par with https://github.com/serviejs/servie and exposing a lighter-weight browser polyfill when you don't need middleware (e.g. https://github.com/mulesoft/js-client-oauth2/tree/master/src/request). |
Any chance to get that merged? |
I'm going to merge and release it as is, for anyone wanting this they can bump directly to |
Closes #97
This PR updates the project to use typings taken from the @types packages in the npm registry. Everything is fairly straight-forward, except the
methods
package used for testing, that has no @types package, so I created a custom typing.It also exports the typings directly through
package.json
, now that it does not rely on thetypings
tool to build them.