Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NativeScript/NativeScript
/ setItem
Method
setItem
packages/core/data/virtual-array/index.ts:94–98 ·
view source on GitHub ↗
(index: number, value: T)
Source
from the content-addressed store, hash-verified
92
}
93
94
setItem(index: number, value: T) {
95
if
(this._cache[index] !== value) {
96
this.load(index, [value]);
97
}
98
}
99
100
/**
101
* Loads items from an array starting at index.
Callers
5
test_VirtualArray_setItemShouldSetCorrectItem
Function · 0.95
test_VirtualArray_setItemShouldRaiseChangeEventWhenYouSetDifferentItem
Function · 0.95
test_VirtualArray_shouldNotRaiseItemsLoadingIfIndexIsLoadedAndGetItemIsCalled
Function · 0.95
test_VirtualArray_shouldRaiseItemsLoadingIfIndexIsNotLoadedAndGetItemIsCalledCorrectNumberOfTimesWithCorrectArgs
Function · 0.95
dynamic-templates-page.ts
File · 0.45
Calls
1
load
Method · 0.95
Tested by
no test coverage detected