-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
chore(ui): init typescript #4408
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
base: main
Are you sure you want to change the base?
Conversation
{ | ||
"compilerOptions": { | ||
// TODO: Remove this once we have migrated to TS | ||
"allowJs": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The allowJs option in a tsconfig.json file allows the TypeScript compiler to include and process .js (JavaScript) files alongside .ts (TypeScript) files. This is useful when: We're migrating a JavaScript project to TypeScript gradually.
Hi @HenryHengZJ, I’d appreciate it if you could check this out 🙏 |
Hey! Super appreciate your work here. We have a big refractor coming in, will hold off to this PR for now |
Okay! Let me know after if you need me |
@manudeli If you're still up for it, can you pull the latest from |
Sure, I'll do that soon |
bad32b4
to
15e0e14
Compare
if (root == null) { | ||
throw new Error('Root element with id "root" not found.') | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To get Type-safety. I added asserting code
related with #2770
This PR updates the project configuration to support a gradual migration from JavaScript to TypeScript. Specifically:
The goal is to eventually migrate all files in packages/ui to .ts/.tsx, improving type safety and developer experience across the codebase.