-
Notifications
You must be signed in to change notification settings - Fork 87
Upgrade to typescript 5 #6986
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
Upgrade to typescript 5 #6986
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Greptile Summary
Confidence Score: 4/5
Important Files Changed
|
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.
11 files reviewed, no comments
Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format
|
@greptileai review |
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.
20 files reviewed, 1 comment
Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format
| } else if (Array.isArray(field?.default_value)) { | ||
| value = field.default_value; | ||
| } else { | ||
| value = field.default_value ?? []; |
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.
logic: type safety issue: field.default_value is typed as string[] | null | undefined, but after checking Array.isArray on line 37, the else branch on line 40 should only handle null | undefined. However, TypeScript doesn't narrow the type, so field.default_value ?? [] could still be string[] | null | undefined, and if it's a non-null, non-undefined, non-array value (which shouldn't happen based on types but isn't guaranteed), this could cause a runtime type error where value: string[] gets assigned a non-array.
| value = field.default_value ?? []; | |
| } else { | |
| value = (field.default_value as string[]) ?? []; | |
| } |
gilluminate
left a comment
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.
LGTM. Code looks clean and improved and with tests all passing it is good to go.
Ticket ENG-1990
Description Of Changes
Upgrade client projects to typescript 5. Fix issues.
Code Changes
Steps to Confirm
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works