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

Update type of CoreOptions.jar #4

Merged
merged 4 commits into from
Apr 28, 2016
Merged

Conversation

demurgos
Copy link
Member

This PR fixes #3

It is related to this erroneous commit.

@demurgos
Copy link
Member Author

demurgos commented Apr 28, 2016

request's documentation about their cookies could be improved...

Even after every fix I still had issues so I just looked the cookie code. Looks like I will have to add an other commit to finally nail it: request does not expose a tough-cookie's CookieJar but a synchronous wrapper.

@@ -1,8 +1,8 @@
import {Stream} from 'stream';
import {Agent, ClientRequest, IncomingMessage} from 'http';
import {Url} from 'url';
// import {Url} from 'url';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't it be better if we remove this line?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll remove it.
I'll send a new commit in ten minutes.

@louy
Copy link
Member

louy commented Apr 28, 2016

LGTM. Just that one comment.

@demurgos
Copy link
Member Author

Ok, I just updated the definitions.
The cookie-related definitions are directly taken from the source-code...

@demurgos
Copy link
Member Author

Ok, looks like I made an error: this namespace should only declare types/interfaces (classes are forbidden).

@louy Sorry to bother you this much about it, but now it should finally be OK

@louy
Copy link
Member

louy commented Apr 28, 2016

No worries. Here's an idea though: create a new file lib/cookies.d.ts and add the RequestJar class to it. then you can import it in index.d.ts and reuse it (and keep it as a class.)

One other way to keep is as a class is to put it inside the request namespace. You only can't export it on the top level.

@demurgos
Copy link
Member Author

demurgos commented Apr 28, 2016

Ok, I think that I will use the first idea and reorganize the typings to match the project structure. (by creating a lib/cookie.d.ts file)

I'll do it tomorrow in a new PR and add comments as discussed in #5. (It's a bigger change)

@louy
Copy link
Member

louy commented Apr 28, 2016

Sounds good.

@louy louy merged commit 8dbbc8c into typed-typings:master Apr 28, 2016
@demurgos
Copy link
Member Author

Nice, thank you for your comments.

@louy
Copy link
Member

louy commented Apr 28, 2016

You're welcome!

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.

CoreOptions.jar should allow booleans
2 participants