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

react: Fix wrong type for e.currentTarget #14682

Closed

Conversation

ypresto
Copy link
Contributor

@ypresto ypresto commented Feb 16, 2017

Many component type definitions uses React.Component subclass or {} for T of HTMLProps<T> or HTMLAttributes<T>, etc.
But it is used for e.currentTarget passed to event handlers and it (T) should be HTMLElement.

(This PR contains #14618 because it will conflict on below line:)

-    interface SVGAttributes<T> extends HTMLAttributes<T> {
+    interface SVGAttributes<T extends SVGElement> extends DOMAttributes<T> {

  • Make your PR against the master branch.
  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run tsc without errors.
  • Run npm run lint package-name if a tslint.json is present.

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: (N/A)
  • Increase the version number in the header if appropriate.
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "../tslint.json" }.

@dt-bot
Copy link
Member

dt-bot commented Feb 16, 2017

enzyme/index.d.ts

to authors (@MarianPalkus @NoHomey @pelotom Cap3 (account can't be detected) jwbay (account can't be detected)). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

fixed-data-table/index.d.ts

to authors (@pepaar @stephenjelfs). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

jsnox/index.d.ts

to author (@stkb). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

material-ui/index.d.ts

to authors (@ngbrown @herrmanno). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

radium/index.d.ts

to authors (@alexgorbatchev @nupplaphil @asvetliakov @mihe). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

react-addons-linked-state-mixin/index.d.ts

can't parse definition header...


react-addons-test-utils/index.d.ts

can't parse definition header...


react-addons-transition-group/index.d.ts

can't parse definition header...


react-bootstrap/index.d.ts

to authors (@walkerburgin @vsiao @danilojrr @Batbold-Gansukh @octatone). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

react-css-modules/index.d.ts

to authors (@KostyaEsmukov @skirsdeda). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

react-custom-scrollbars/index.d.ts

to author (@David-LeBlanc-git). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

react-datagrid/index.d.ts

to author (@stephenjelfs). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

react-fa/index.d.ts

to authors (@flaub @patsissons @LKay). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

react-holder/index.d.ts

to author (@isman-usoh). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

react-json-pretty/index.d.ts

to author (@LKay). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

react-leaflet/index.d.ts

to author (@danzel). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

react-mdl/index.d.ts

to author (@bradzacher). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

react-router/v2/lib/Link.d.ts

can't parse definition header...


react/index.d.ts

to authors (@pspeter3 @vsiao @johnnyreilly @bbenezech @pzavolinsky AssureSign (account can't be detected) Microsoft (account can't be detected)). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

@ypresto ypresto force-pushed the fix-react-element-type-parameter branch from efce421 to 7598796 Compare February 27, 2017 18:37
@mhegazy mhegazy closed this Mar 11, 2017
@mhegazy mhegazy reopened this Mar 11, 2017
@mhegazy
Copy link
Contributor

mhegazy commented Mar 11, 2017

Looks like we need to update this PR.

@mhegazy mhegazy added the Revision needed This PR needs code changes before it can be merged. label Mar 11, 2017
@ypresto ypresto force-pushed the fix-react-element-type-parameter branch from a3a01d0 to b1df7c5 Compare March 12, 2017 11:09
@ypresto
Copy link
Contributor Author

ypresto commented Mar 12, 2017

Fixed..! (force update is used)

@vsiao
Copy link
Contributor

vsiao commented Mar 13, 2017

Thanks, @ypresto

@ericanderson
Copy link
Contributor

Assuming you fix the build issue, LGTM.

@paulvanbrenk
Copy link
Contributor

Closing, can you fix the CI build and the merge conflict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Revision needed This PR needs code changes before it can be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants