Skip to content

DateBox strategies: improve ts#32559

Open
Zedwag wants to merge 2 commits intoDevExpress:26_1from
Zedwag:dbStrategiesTs__26_1
Open

DateBox strategies: improve ts#32559
Zedwag wants to merge 2 commits intoDevExpress:26_1from
Zedwag:dbStrategiesTs__26_1

Conversation

@Zedwag
Copy link
Contributor

@Zedwag Zedwag commented Feb 13, 2026

No description provided.

@Zedwag Zedwag self-assigned this Feb 13, 2026
@Zedwag Zedwag requested a review from a team as a code owner February 13, 2026 10:21
@Zedwag Zedwag added the 26_1 label Feb 13, 2026
Copilot AI review requested due to automatic review settings February 13, 2026 10:21
Copy link
Contributor

Copilot AI left a 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 improves TypeScript typing across the DateBox component and its strategy classes. The changes focus on adding explicit type annotations, converting legacy ctor methods to proper TypeScript constructors, improving import paths, and refining return types throughout the codebase.

Changes:

  • Migrated strategy classes from ctor to proper TypeScript constructor methods with typed parameters
  • Added explicit return type annotations to methods across all DateBox strategies
  • Changed Calendar import path from @js/ui/calendar to @ts/ui/calendar/calendar for consistency
  • Improved type safety by replacing void with boolean | undefined for keyboard handler return types
  • Removed numerous @ts-expect-error suppressions where typing improvements made them unnecessary

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
m_text_editor.base.ts Made element parameter optional in _hasFocusClass and changed || to ?? operator
editor.ts Removed unnecessary eslint disable comment for showValidationMessageTimeout
m_rangeCalendar.ts Updated Calendar import path, added @ts-expect-error for dateBox type mismatch, improved getValue() typing
m_multiselect_date_box.ts Removed multiple @ts-expect-error suppressions for Calendar private methods
m_date_box.strategy.ts Converted ctor to constructor, added comprehensive type annotations for base strategy class
m_date_box.strategy.native.ts Converted ctor to constructor, added return types and parameter types
m_date_box.strategy.list.ts Converted ctor to constructor, improved typing throughout, fixed getDefaultDate() to use new Date(0)
m_date_box.strategy.date_view.ts Converted ctor to constructor, improved popup configuration typing
m_date_box.strategy.calendar_with_time.ts Converted ctor to constructor, improved typing and removed @ts-expect-error comments
m_date_box.strategy.calendar.ts Converted ctor to constructor, updated Calendar import path, improved typing
date_view.ts Added default value for type option
date_utils.ts Improved getStringFormat to use 'type' in format check
date_box.mask.ts Updated return types for keyboard handlers and removed unused import
date_box.base.ts Updated event type from ValueChangedEvent to InteractionEvent, improved typing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant