-
Notifications
You must be signed in to change notification settings - Fork 667
DateBox: improve types #32393
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: 26_1
Are you sure you want to change the base?
DateBox: improve types #32393
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 pull request improves TypeScript type definitions throughout the DateBox component and related modules, removing @ts-expect-error comments and adding proper type annotations. The changes focus on:
Changes:
- Enhanced type definitions for DateBox core classes and strategies with proper interfaces and type annotations
- Improved type safety for date manipulation utilities and mask handling
- Removed numerous
@ts-expect-errorsuppressions by fixing underlying type issues - Updated
dxElementWrapperinterface to support additional parameter types (string,dxElementWrapper) - Enhanced DateLocalization interface with missing methods (
formatUsesDayName,formatUsesMonthName,parse)
Reviewed changes
Copilot reviewed 21 out of 23 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
packages/devextreme/js/core/renderer.d.ts |
Added support for string and dxElementWrapper types in add() and append() methods |
packages/devextreme/js/common/core/localization/date.d.ts |
Added missing methods and improved parameter types for DateLocalization interface |
packages/devextreme/js/__internal/ui/scroll_view/scrollable.ts |
Added event parameter to onStart/onEnd/onBounce handlers |
packages/devextreme/js/__internal/ui/menu/menu.ts |
Removed ts-expect-error by fixing dxElementWrapper.add() types |
packages/devextreme/js/__internal/ui/diagram/ui.diagram.menu_helper.ts |
Replaced property access with optional chaining and removed ts-expect-errors |
packages/devextreme/js/__internal/ui/date_box/m_date_view_roller.ts |
Comprehensive type improvements with proper interfaces and generics |
packages/devextreme/js/__internal/ui/date_box/m_date_utils.ts |
Added type definitions for format keys, date components, and utility functions |
packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy*.ts |
Enhanced strategy classes with proper types and removed ts-expect-errors |
packages/devextreme/js/__internal/ui/date_box/m_date_box.mask*.ts |
Improved mask handling with explicit types for date parts and validation |
packages/devextreme/js/__internal/ui/date_box/m_date_box.base.ts |
Renamed dateOption to getDateOption/setDateOption with proper typing |
packages/devextreme/js/__internal/ui/date_box/date_view.ts |
Removed TODO comments and added proper event types |
packages/devextreme/js/__internal/ui/calendar/calendar.views.ts |
Removed unnecessary eslint-disable comments |
packages/devextreme/js/__internal/grids/grid_core/** |
Removed ts-expect-error suppressions |
packages/devextreme/js/__internal/events/m_visibility_change.ts |
Removed ts-expect-error for dxElementWrapper.add() |
packages/devextreme/js/__internal/core/localization/date.ts |
Made format parameter optional in parse() method |
packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.calendar.ts
Show resolved
Hide resolved
packages/devextreme/js/__internal/ui/date_box/m_date_box.mask.ts
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 21 out of 24 changed files in this pull request and generated no new comments.
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 21 out of 24 changed files in this pull request and generated 1 comment.
No description provided.