-
Couldn't load subscription status.
- Fork 3
Typrescript fixes and added TypeScript Type Check to the pipeline #339
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
Conversation
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.
Pull Request Overview
This PR addresses TypeScript type safety issues across multiple components by improving type definitions and adding proper type assertions. The changes focus on standardizing type definitions for table cell instances and handling potentially undefined values more safely.
- Standardized
CellDatainterface across components to useRecord<string, unknown>for row originals - Added proper type guards and assertions for accessing nested properties
- Imported missing TypeScript type definitions
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| YamlEditor.tsx | Added event existence check before calling onChange callback |
| ProjectsList.tsx | Refactored cell instance types and added type assertions for accessing row original properties |
| MemberTable.tsx | Changed row original type to generic Record and added type assertions for property access |
| ImportMembersDialog.tsx | Introduced new CellData interface and updated Cell component with proper type casting |
| FeedbackButton.tsx | Imported TextAreaInputEventDetail type and simplified function signatures |
| ControlPlaneListWorkspaceGridTile.tsx | Updated createErrorView parameter to accept undefined error values |
| Providers.tsx | Standardized CellData interface and added type assertions for row original property access |
| MCPHealthPopoverButton.tsx | Cleaned up CellData interface and updated all Cell components to use consistent typing |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Thanks for taking care of this 🙏👍
Two suggestions:
- Let's add a script to package.json and run this explicitly in our pipeline
- Let's get rid of the custom
CellData<T>definitions and rely on type inference. I marked a couple of occasions but I think we can simply remove them all
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.
So clean 🤩 🫧
What this PR does / why we need it:
Typrescript fixes and added strict TypeScript Type Checking to the pipeline to make the code less error prone