Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Move to TS #954

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

Open
simcha90 wants to merge 3 commits into testing-library:main
base: main
Choose a base branch
Loading
from simcha90:ts-2
Open

Move to TS #954

simcha90 wants to merge 3 commits into testing-library:main from simcha90:ts-2

Conversation

Copy link
Contributor

@simcha90 simcha90 commented May 6, 2021
edited
Loading

What:
Move code to TS

Why:

How:

Checklist:

  • Documentation added to the
    docs site
  • Tests
  • Typescript definitions updated
  • Ready to be merged

Copy link

codesandbox-ci bot commented May 6, 2021

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 c4fda2b:

Sandbox Source
react-testing-library-examples Configuration

@@ -29,12 +33,14 @@ function getCodeFrame(frame) {

let rawFileContents = ''
try {
rawFileContents = readFileSync(filename, 'utf-8')
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
rawFileContents = readFileSync?.(filename, 'utf-8')
Copy link
Member

@eps1lon eps1lon May 6, 2021

Choose a reason for hiding this comment

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

This would no longer throw if readFileSync is not callable.

Generally, don't change any runtime when porting to TypeScript. Use type casting instead so that we know where we might want to work on.

nickserv reacted with thumbs up emoji
Copy link
Member

Hi, do you think you can work on these merge conflicts or do you need help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@eps1lon eps1lon eps1lon requested changes

+1 more reviewer

@fildon fildon fildon left review comments

Reviewers whose approvals may not affect merge requirements

Requested changes must be addressed to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /