-
Notifications
You must be signed in to change notification settings - Fork 663
Demos: Fix TS problems and make TS improvements in strict mode (Navigation) #32072
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 fixes TypeScript problems and improves type safety across Navigation and StrictMode demos, enabling TypeScript checking for several demo categories (Button, Charts, Form, Gauges, List, Menu, ScrollView, Splitter, Tabs, TreeView).
Key Changes:
- Removed TypeScript exclusions for 14 demo categories from
tsconfig.react-check.json - Added proper null/undefined checks with optional chaining throughout demos
- Added explicit type annotations to functions and variables
- Created type definition files where missing
- Converted utility objects/services to properly typed exports
Reviewed changes
Copilot reviewed 141 out of 141 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/demos/tsconfig.react-check.json | Removed exclusions for Button, Charts, Form, Gauges, List, Menu, NavigationOverview, ScrollView, Splitter, Tabs, and TreeView demos |
| apps/demos/Demos/TreeView/**/React/*.tsx | Added null checks for itemData, optional chaining for properties, and updated state types to allow undefined |
| apps/demos/Demos/Gauges/**/React/*.tsx | Added type annotations to functions, proper null checks, and created missing type definition files |
| apps/demos/Demos/Charts/**/React/*.tsx | Extensive type improvements: proper event types, null checks, return type annotations, and type definition files |
| apps/demos/Demos/Form/**/React/*.tsx | Fixed prop spreading order, updated state types, and improved null safety |
| apps/demos/Demos/Menu/Scrolling/React/*.tsx | Added null check for submenuContainer before accessing style property |
| apps/demos/Demos/List/Selection/React/*.tsx | Simplified boolean state type and added nullish coalescing |
| apps/demos/Demos/ScrollView/Overview/React/*.tsx | Added explicit type for content state and proper undefined handling |
| apps/demos/Demos/Splitter/Overview/React/*.tsx | Added proper ref typing and instanceof check before DOM manipulation |
| apps/demos/Demos/Button/PredefinedTypes/React/*.tsx | Added nullish coalescing for option retrieval |
apps/demos/Demos/Gauges/SubvalueIndicatorsRuntimeCustomization/ReactJs/App.js
Outdated
Show resolved
Hide resolved
apps/demos/Demos/Gauges/SubvalueIndicatorsRuntimeCustomization/React/App.tsx
Outdated
Show resolved
Hide resolved
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
Copilot reviewed 142 out of 142 changed files in this pull request and generated 5 comments.
No description provided.