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

Move to TS #954

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Move to TS #954

wants to merge 3 commits into from

Conversation

simcha90
Copy link
Contributor

@simcha90 simcha90 commented May 6, 2021

What:
Move code to TS

Why:

How:

Checklist:

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

@codesandbox-ci
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

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.

@nickmccurdy
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants