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: missing target types at KeyboardEvent #60696

Merged
merged 1 commit into from Jul 5, 2022

Conversation

ArthurPedroti
Copy link
Contributor

@ArthurPedroti ArthurPedroti commented Jun 6, 2022

When you try to get the target.value at the Keyboard Event, you can't reach it, unlike the other events. For me, it's only a missing target types like other events have.

Sandbox with the errors reproduced: https://codesandbox.io/s/target-onkeydown-missing-type-kr46u1
image

@typescript-bot
Copy link
Contributor

typescript-bot commented Jun 6, 2022

@ArthurPedroti Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through.

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

This PR can be merged.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Only a DT maintainer can approve changes without tests

All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 60696,
  "author": "ArthurPedroti",
  "headCommitOid": "5858dda7d8f63e5948024c2b421a3b7dbfdb1cc7",
  "mergeBaseOid": "7714ca18128ad9f9d0f0bcc4dbd8e49ae07fa39f",
  "lastPushDate": "2022-06-06T23:24:50.000Z",
  "lastActivityDate": "2022-07-05T21:54:59.000Z",
  "maintainerBlessed": "Waiting for Author to Merge",
  "mergeOfferDate": "2022-07-05T21:44:41.000Z",
  "mergeRequestDate": "2022-07-05T21:54:59.000Z",
  "mergeRequestUser": "ArthurPedroti",
  "hasMergeConflict": false,
  "isFirstContribution": true,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "react",
      "kind": "edit",
      "files": [
        {
          "path": "types/react/index.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "johnnyreilly",
        "bbenezech",
        "pzavolinsky",
        "ericanderson",
        "DovydasNavickas",
        "theruther4d",
        "guilhermehubner",
        "ferdaber",
        "jrakotoharisoa",
        "pascaloliv",
        "hotell",
        "franklixuefei",
        "Jessidhia",
        "saranshkataria",
        "lukyth",
        "eps1lon",
        "zieka",
        "dancerphil",
        "dimitropoulos",
        "disjukr",
        "vhfmag",
        "hellatan",
        "priyanshurav"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [],
  "mainBotCommentID": 1148042626,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added Critical package Untested Change This PR does not touch tests labels Jun 6, 2022
@typescript-bot typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board Jun 6, 2022
@typescript-bot
Copy link
Contributor

@DangerBotOSS
Copy link

Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files.
The check for missing properties isn't always right, so take this list as advice, not a requirement.

react (unpkg)

was missing the following properties:

  1. unstable_act

Generated by 🚫 dangerJS against 5858dda

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Jun 7, 2022
@typescript-bot typescript-bot added the Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer. label Jun 25, 2022
@typescript-bot
Copy link
Contributor

It has been more than two weeks and this PR still has no reviews.

I'll bump it to the DT maintainer queue. Thank you for your patience, @ArthurPedroti.

(Ping @johnnyreilly, @bbenezech, @pzavolinsky, @ericanderson, @DovydasNavickas, @theruther4d, @guilhermehubner, @ferdaber, @jrakotoharisoa, @pascaloliv, @Hotell, @franklixuefei, @Jessidhia, @saranshkataria, @lukyth, @eps1lon, @zieka, @dancerphil, @dimitropoulos, @disjukr, @vhfmag, @hellatan, @priyanshurav.)

@typescript-bot typescript-bot moved this from Needs Maintainer Review to Needs Maintainer Action in New Pull Request Status Board Jun 25, 2022
@sheetalkamat sheetalkamat moved this from Needs Maintainer Action to Waiting for Author to Merge in New Pull Request Status Board Jul 5, 2022
@typescript-bot typescript-bot added Self Merge This PR can now be self-merged by the PR author or an owner and removed Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer. labels Jul 5, 2022
@ArthurPedroti
Copy link
Contributor Author

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in New Pull Request Status Board Jul 5, 2022
@typescript-bot typescript-bot merged commit 2b52258 into DefinitelyTyped:master Jul 5, 2022
@typescript-bot typescript-bot removed this from Recently Merged in New Pull Request Status Board Jul 6, 2022
@turansky
Copy link
Contributor

turansky commented Jul 7, 2022

MouseEvent - latest non-fixed?

eps1lon added a commit to eps1lon/DefinitelyTyped that referenced this pull request Jul 7, 2022
@eps1lon
Copy link
Collaborator

eps1lon commented Jul 7, 2022

@ArthurPedroti Sorry this slipped through. We'll have to revert this in #61124

event might be a bubbled even so you never know what its target is. What you want instead is to use event.currentTarget.

We have this documented, though it might be easy to miss:

/**
* currentTarget - a reference to the element on which the event listener is registered.
*
* target - a reference to the element from which the event was originally dispatched.
* This might be a child element to the element on which the event listener is registered.
* If you thought this should be EventTarget & T, see #11508 (comment)
*/

-- https://github.com/eps1lon/DefinitelyTyped/blob/b246ab4535951fdd45a37fe1eba4babf2fa573f2/types/react/index.d.ts#L1202-L1208

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical package Self Merge This PR can now be self-merged by the PR author or an owner Untested Change This PR does not touch tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants