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

TSC error suppression for latest versions #272

Merged
merged 5 commits into from
Nov 2, 2022
Merged

Conversation

vunderkind
Copy link
Contributor

Problem summary

Newer versions of TypeScript seem to be throwing compile-time errors deep within the lib.dom.ts file, with the error looking something like this:

"node_modules/typescript/lib/lib.dom.d.ts(14578,11): error TS2430: Interface 'WebGL2RenderingContext' incorrectly extends interface 'WebGL2RenderingContextBase'.\n"

A quick and dirty fix is to skip library checks, according to this discussion. That's what is contained in this pull request.

Env parameters

My machine, which recorded this issue, is a Macbook Pro (2019), running Node v16.9.0, npm 8.19.2 and TypeScript v4.8.4. This happened with the latest near app build via npx create-near-app@latest.

@ailisp
Copy link
Member

ailisp commented Oct 24, 2022

Thank you @vunderkind . Please do a yarn build to pass the CI. Other than that, it looks good to me!

@vunderkind
Copy link
Contributor Author

Thank you @vunderkind . Please do a yarn build to pass the CI. Other than that, it looks good to me!

Thanks for your response. Doing so now!

@vunderkind
Copy link
Contributor Author

Done — I added another skipLibCheck flag to the root tsconfig because the same issue occurred here as well. Thank you.

@volovyks
Copy link
Collaborator

@vunderkind linter and build tests are not happy with these changes.
Can you run:

  • yarn lint
  • yarn format
  • yarn build

and push?

@vunderkind
Copy link
Contributor Author

@volovyks — thanks for the nudge! Ach, turned out I was modifying the file in the lib folder instead of the src. Took your recommendation and it built fine on my end. Please re-trigger your pipeline and let me know if it passes now 😬

Copy link
Member

@ailisp ailisp left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks @vunderkind !

@volovyks volovyks closed this Oct 27, 2022
@volovyks volovyks reopened this Oct 27, 2022
@volovyks volovyks merged commit eb5f03c into near:develop Nov 2, 2022
waynenilsen pushed a commit to waynenilsen/near-sdk-js that referenced this pull request Nov 10, 2022
* TSC error suppression for latest versions

* TSC error suppression & lint fix

Co-authored-by: Bo Yao <bo@near.org>
Co-authored-by: Serhii Volovyk <SergeyVolovyk@gmail.com>
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.

3 participants