Events_strategy: improve typing - #35135
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The changes are a straightforward internal rename/refactor with verified reference updates and no remaining usages of the removed module.
Pull request overview
This PR updates the internal EventsStrategy implementation to a better-typed TypeScript module and adjusts entry points/imports to reference the new module, removing the legacy m_events_strategy file.
Changes:
- Replaced
__internal/core/m_events_strategy.tswith a new__internal/core/events_strategy.tsthat adds explicit TS types/interfaces. - Updated the deprecated public entry
js/core/events_strategy.jsto re-export from the new internal module. - Updated Knockout validation integration to import
EventsStrategyfrom the new@ts/core/events_strategymodule.
File summaries
| File | Description |
|---|---|
| packages/devextreme/js/core/events_strategy.js | Deprecated entry now re-exports EventsStrategy from the new internal module path. |
| packages/devextreme/js/__internal/integration/knockout/validation.ts | Updates import to @ts/core/events_strategy to follow the renamed internal module. |
| packages/devextreme/js/__internal/core/m_events_strategy.ts | Removes the legacy implementation file. |
| packages/devextreme/js/__internal/core/events_strategy.ts | Adds the new typed EventsStrategy implementation and related TS interfaces/types. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🔵 Needs a closer look
The new TypeScript implementation introduces typing/unused-parameter issues that are likely to be flagged by lint/TS rules and should be corrected before merging.
Review details
Suppressed comments (2)
Previously missed (2) — in code that hasn't changed since the last review.
packages/devextreme/js/__internal/core/events_strategy.ts:5
- Avoid using the
Functiontype for event handlers; it disables parameter/return type checking and is inconsistent with other callback typing in the codebase (e.g.document_size_callbacks.tsuses a concrete function signature). Use an explicit callable signature instead.
packages/devextreme/js/__internal/core/events_strategy.ts:100 - The
eventNameparameter in this callback is unused; this is likely to be flagged by TS/ESLint unused-parameter rules. Use_(or prefix with_) to mark it intentionally unused.
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Lite
No description provided.