mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(core): Added ObservableArray constructor declarations to allow setting multiple arguments (#9980)
This commit is contained in:
committed by
GitHub
parent
f9b52b9aac
commit
d82f3d990d
@@ -16,7 +16,8 @@ export const test_ObservableArray_shouldCopySourceArrayItems = function () {
|
||||
export const test_ObservableArray_shouldCopyMultipleItemsAsSource = function () {
|
||||
// >> observable-array-arguments
|
||||
const sa = [1, 2, 3];
|
||||
const array = new ObservableArray(...sa);
|
||||
// Avoid appending items using spread operator as it will skip argument type check
|
||||
const array = new ObservableArray(1, 2, 3);
|
||||
// << observable-array-arguments
|
||||
|
||||
TKUnit.assertEqual(array.length, 3, 'ObservableArray length should be 3');
|
||||
|
||||
Reference in New Issue
Block a user