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

fix: Update tsconfig to address type checking issues #10104

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

Conversation

FabricSoul
Copy link

@FabricSoul FabricSoul commented Jan 27, 2024

Please describe the changes this PR makes and why it should be merged:
This PR updates the tsconfig.json file by enabling strictNullChecks, noEmit, and allowImportingTsExtensions options. These changes improve the type checking process by ensuring that null and undefined values are handled correctly, preventing type-related runtime errors. Furthermore, the noEmit option is set to true to enable type-checking without compiling the code, suitable for our current build process.

Status and versioning classification:

  • This PR only includes non-code changes, like changes to documentation, README, etc.

Copy link

vercel bot commented Jan 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
discord-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 24, 2024 6:28am
discord-js-guide ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 24, 2024 6:28am

@Qjuh
Copy link
Contributor

Qjuh commented Jan 27, 2024

How does the noEmit suit the build process in package.json which only calls tsc and nothing else? If it doesn’t emit then there won’t be files to run.

Co-authored-by: codershiba <155646804+codershiba@users.noreply.github.com>
"skipLibCheck": true
"skipLibCheck": true,
"strictNullChecks": true,
"allowImportingTsExtensions": true
Copy link
Member

Choose a reason for hiding this comment

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

This should only be enabled for deno/bun, not every TS project! 👀

Copy link
Author

Choose a reason for hiding this comment

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

Make sense

Copy link
Author

@FabricSoul FabricSoul left a comment

Choose a reason for hiding this comment

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

add
"strictNullChecks": true,
"allowImportingTsExtensions": true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Review in Progress
Development

Successfully merging this pull request may close these issues.

None yet

5 participants