Repository navigation
Data source adapter, virtual data loader, TreeList data controller and data source adapter - type virtual data loader - #35523
Open
bit-byte0 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Several declared contracts contradict existing implementations, while a double assertion bypasses controller validation.
Review effort: Balanced
Findings: 4
Open (4)
What changed in this PR
Adds strict typing to the legacy grid virtual data loader and extracts its contracts.
Changes:
- Defines loader controller, cache, callback, and data-option contracts.
- Annotates loader fields, parameters, and return types.
- Connects the virtual-scroll controller to the typed loader.
| File | Description |
|---|---|
m_virtual_scrolling_core.ts |
Passes the controller to the typed loader. |
virtual_data_loader/types.ts |
Defines loader contracts. |
m_virtual_data_loader.ts |
Adds strict annotations and removes type suppressions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| export type ChangedCallback = (args?: unknown) => void; | ||
|
|
||
| export interface ProcessedChange { | ||
| changeType?: unknown; |
Contributor
There was a problem hiding this comment.
can DataChange or StoreChange type help here with better typing?
| const processChanged = ( | ||
| that: VirtualDataLoader, | ||
| changed: ChangedCallback, | ||
| changeType?: unknown, |
Contributor
There was a problem hiding this comment.
is it corresponds DataChange changeType or StoreChange type?
| } | ||
|
|
||
| private handleDataChanged(callBase, e) { | ||
| private handleDataChanged(callBase: ChangedCallback, e?: { changes?: unknown }): void { |
Contributor
There was a problem hiding this comment.
same for changes type
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Added strict types to the grid_core virtual data loader, so m_virtual_data_loader.ts passes the strict lint rules while keeping the
m_prefixHow
Annotated fields, parameters and return types, moved the loader contract types into types.ts and replaced the bare
@ts-expect-errordirectives with real types