-
Notifications
You must be signed in to change notification settings - Fork 663
Demos: Fix TS problems and make TS improvements in demos in strict mode (Editors) #32079
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
Signed-off-by: Andrei Kharitonov <[email protected]>
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 enables TypeScript strict mode checking for editor-related React demos by removing exclusions from tsconfig.react-check.json and fixing TypeScript issues. The changes focus on improving type safety across demos for components like Autocomplete, Calendar, Chat, NumberBox, SelectBox, Slider, TextArea, Toast, Validation, and others.
- Removes 44 demo exclusions from TypeScript checking configuration
- Adds proper null/undefined handling with optional chaining and nullish coalescing
- Improves type annotations and imports using
typekeyword for type-only imports - Refactors code to eliminate redundant intermediate variables
Reviewed changes
Copilot reviewed 62 out of 62 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
tsconfig.react-check.json |
Removes exclusions for editor demos now passing strict TypeScript checks |
Validation/Overview (React & ReactJs) |
Adds optional chaining for validator ref access |
Toast/Stack (React & ReactJs) |
Changes null to undefined for NumberBox default values |
TextArea/Overview (React & ReactJs) |
Changes maxLength state from null to undefined |
TagBox/* (React & ReactJs) |
Adds null safety checks and improves type annotations |
Stepper/FormIntegration (React & ReactJs) |
Adds null coalescing for date array access |
SpeechToText/Overview (React & ReactJs) |
Derives languages array from langMap object, adds Language type |
Slider/Overview (React) |
Adds type annotation to format function |
SelectBox/* (React) |
Adds proper TypeScript interfaces for components and type-only imports |
RangeSlider/Overview (React & ReactJs) |
Extracts min/max constants, adds null coalescing for value handling |
RadioGroup/Overview (React) |
Adds type annotation to renderCustomItem function |
Popup/Overview (React & ReactJs) |
Adds optional chaining for employee property access |
NumberBox/Overview (React & ReactJs) |
Adds optional chaining for event.key access |
Map/Markers (React & ReactJs) |
Changes marker URL state from null to undefined |
HtmlEditor/* (React & ReactJs) |
Removes redundant variables, adds null coalescing, improves type imports |
FileUploader/FileUploading (React & ReactJs) |
Adds early return guard for null value |
DropDownButton/Overview (React & ReactJs) |
Adds null handling for color values and querySelector results |
DropDownBox/MultipleSelection (React) |
Adds explicit type annotation in forEach callback |
Common/PopupAndNotificationsOverview (React & ReactJs) |
Adds null check guard clause for updatedCurrentHouse |
Common/EditorsRightToLeftSupport (React & ReactJs) |
Changes className from null to undefined |
Chat/* (React & ReactJs) |
Adds extensive null safety, type improvements, and proper type casting |
Calendar/* (React & ReactJs) |
Changes cellComponent and disabledDates from null to undefined |
Autocomplete/Overview (React & ReactJs) |
Refactors loadOptions iteration with proper typing |
apps/demos/Demos/Common/PopupAndNotificationsOverview/React/App.tsx
Outdated
Show resolved
Hide resolved
apps/demos/Demos/Common/PopupAndNotificationsOverview/ReactJs/App.js
Outdated
Show resolved
Hide resolved
…de (Editors) (DevExpress#32079) Signed-off-by: Andrei Kharitonov <[email protected]>
…de (Editors) (#32079) (#32097) Signed-off-by: Andrei Kharitonov <[email protected]>
No description provided.