Skip to content

Conversation

@ajivanyandev
Copy link
Contributor

No description provided.

@ajivanyandev ajivanyandev self-assigned this Dec 30, 2025
Copilot AI review requested due to automatic review settings December 30, 2025 13:14
@ajivanyandev ajivanyandev requested a review from a team as a code owner December 30, 2025 13:14
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 fixes a TypeScript type mismatch in the ArrayStore.onPush callback and Store.push() method. Previously, onPush was incorrectly typed to receive Array<TItem> when it actually receives an array of change objects. The fix introduces a new StoreChange<TItem, TKey> type and updates both the onPush callback signature and the push method signature to use this type.

Key changes:

  • Introduced StoreChange<TItem, TKey> type to describe push change objects with properties: type, data, key, and index
  • Updated Store.push() method signature to accept Array<StoreChange<TItem, TKey>> instead of inline type definition
  • Corrected StoreOptions.onPush callback parameter type from Array<TItem> to Array<StoreChange<TItem, TKey>>

Reviewed changes

Copilot reviewed 1 out of 3 changed files in this pull request and generated no comments.

File Description
packages/devextreme/ts/dx.all.d.ts Adds StoreChange type definition and updates Store.push() and StoreOptions.onPush to use it
packages/devextreme/js/data/store.d.ts Adds StoreChange type definition and updates Store.push() and StoreOptions.onPush signatures, includes JSDoc annotation for the correct parameter type
e2e/compilation-cases/T1316896.ts Adds compilation test case that verifies the type fix works correctly with ArrayStore

@ajivanyandev ajivanyandev merged commit cfeef53 into DevExpress:26_1 Dec 30, 2025
93 checks passed
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.

2 participants