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

TS Conversion > src/events.js + edit src/events.d.ts #1008

Closed
wants to merge 6 commits into from

Conversation

riotrah
Copy link
Contributor

@riotrah riotrah commented Aug 12, 2021

What: Conversion of events.js to TS per #494 . Also, change events.d.ts to reflect what I perceive are more accurate types, and closer to those of the dom-testing-library docs.

Why: 1. events.ts conversion motivation outlined in #494. 2. events.d.ts changes might be unnecessary or innapropriate,

How: 1. Changed filename. 2. Fixed errors. 3. Ran tests. 4. Repeat after necessary changes.

Checklist:

  • Documentation added to the
    docs site NOT SURE IF RELEVANT
  • Tests
  • TypeScript definitions updated
  • Ready to be merged

I don't think so, there's some things left in commits for this PR that are really better off changed or even removed, but warrant being present during code review.

  1. I am not sure if the events.d.ts is intended to be kept after TS conversions, as it's the primary external facing types that users consume. Its current types are clear, simple and legible, however the changes I've made here are much more verbose and potentially hard to read for those contributing or trying to read it. I'm not sure if changing externally facing types is within acceptable scope for the TS conversion effort, but will react to feedback accordingly.

I have some other comments that serve also as questions and as documentation, committed to the repo in their current form, but after responses to them, I think it's best I edit them to reflect any feedback. I've created them in Grok format as they are not necessarily inline comment-worthy, yet benefit from proximity to code, and their live/web viewable versions are at these links:

  1. https://dev.app.trygrok.com/pl/YQHa2AMeAQAeanwo/E4kQYcCbQa61VwiM5-hSgw?uid=zbdKDOqUR0KqJYTWm0dkxA
  2. https://dev.app.trygrok.com/pl/YQHa2AMeAQAeanwo/fX-L8uEtSoCe7o0fPSTX8Q?uid=CfePr7tKRb2UFBgXT_6X6w
  3. https://dev.app.trygrok.com/pl/YQHa2AMeAQAeanwo/ZtdDbdxxTaGrABrpft0k2g?uid=liEQZPW0S8eVwq6nHKLflg

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 2459f86:

Sandbox Source
react-testing-library-examples Configuration

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

This PR is too verbose at the moment. I think this file should be looked at later in our migration process. I suspect that there's nothing gained by converting this file to TypeScript.

The migration should ensure that the file is marked as moved in GitHub i.e. the amount of changes need to be as minimal as possible.

Type-coverage can be improved in follow-up PRs.

@riotrah riotrah closed this Feb 9, 2023
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.

2 participants