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 index.d.ts for react-redux #20848

Merged
merged 3 commits into from
Oct 28, 2017
Merged

Conversation

pdeva
Copy link
Contributor

@pdeva pdeva commented Oct 22, 2017

Please fill in this template.

known issue described in comments

Select one of these and delete the others:

If changing an existing definition:

#20796

known issue described in comments
@dt-bot
Copy link
Member

dt-bot commented Oct 22, 2017

types/react-redux/index.d.ts

to authors (@tkqubo @thasner @kenzierocks @clayne11 @tansongyang @NicholasBoll @mDibyo). Could you review this PR?
👍 or 👎?

@typescript-bot typescript-bot added the Popular package This PR affects a popular package (as counted by NPM download counts). label Oct 22, 2017
Copy link
Contributor

@tansongyang tansongyang left a comment

Choose a reason for hiding this comment

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

This makes sense to me, but I'm not one of the core contributors, so let's see what they think.

@@ -12,7 +12,7 @@
// TypeScript Version: 2.4
// There is a known issue in TypeScript, which doesnt allow decorators to change the signature of the classes
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be "doesn't", not "doesnt".

// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4

// There is a known issue in TypeScript, which doesnt allow decorators to change the signature of the classes
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if this comment should be part of the rest of this "block" -- could you move it down to where the connect function is declared?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

its here so its obvious to the person using this type definition.
react-redux is eseentially just the connect() function. as soon as someone use this definition, they will be bombarded with a bunch of errors. so better to put this at the very top instead of hoping they will hunt and find this message.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, then can you at least separate it from the version comment by a newline? I'd like to see it as its own thing, rather than visually blending in.

Copy link
Contributor

Choose a reason for hiding this comment

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

@pdeva not required for merge, but it would be nice to have some mention of this issue down where the connect function is declared as well. If someone is using ts-server or an IDE, they will be taken straight to the definition, not the top of the file. Something like "See file header for a known issue about using the connect function as a decorator." would work.

Copy link
Contributor

@octylFractal octylFractal left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@mDibyo
Copy link
Contributor

mDibyo commented Oct 24, 2017

@pdeva Left a response on one of kenzierocks's comments above.

@typescript-bot
Copy link
Contributor

Approved by a listed owner. PR ready to merge pending express review by a maintainer.

@typescript-bot typescript-bot added this to Merge: Express in Pull Request Triage Backlog Oct 24, 2017
@sheetalkamat sheetalkamat merged commit f6f55fa into DefinitelyTyped:master Oct 28, 2017
@typescript-bot typescript-bot removed this from Merge: Express in Pull Request Triage Backlog Oct 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Popular package This PR affects a popular package (as counted by NPM download counts).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants