IEnhancedObservableArray
API > [PersistentModelObservable Module] > IEnhancedObservableArray
Interface
An observable collection in @besync/GraphStore; it extends the MobX observable array with some additional properties
Type parameters
T
Hierarchy
IObservableArray
.<T
>
↳ IEnhancedObservableArray
Indexable
[n: number
]: T
An observable collection in @besync/GraphStore; it extends the MobX observable array with some additional properties
Properties
$emobx
● $emobx: any
Defined in PersistentModelObservable.ts:27
Used internally by @besync/GraphStore; not an authorized public API
exists
● exists: boolean
Defined in PersistentModelObservable.ts:17
Indicates if this collection was found in the persistent store
length
● length: number
Inherited from Array.length
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1114
Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
loading
● loading: boolean
Defined in PersistentModelObservable.ts:12
Indicates if this collection is currently being retrieved from the persistent store
Methods
clear
► clear(): T
[]
Inherited from IObservableArray.clear
Defined in /Volumes/DATA/projects/graphstore/node_modules/mobx/lib/types/observablearray.d.ts:10
Returns: T
[]
concat
► concat(...items: (T
[]⎮ReadonlyArray
.<T
>)[]): T
[]
► concat(...items: (T
[]⎮T
⎮ReadonlyArray
.<T
>)[]): T
[]
Inherited from Array.concat
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1136
Combines two or more arrays.
Parameters:
Param | Type | Description |
---|---|---|
items | (T []⎮ReadonlyArray .<T >)[] | Additional items to add to the end of array1. |
Returns: T
[]
Inherited from Array.concat
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1141
Combines two or more arrays.
Parameters:
Param | Type | Description |
---|---|---|
items | (T []⎮T ⎮ReadonlyArray .<T >)[] | Additional items to add to the end of array1. |
Returns: T
[]
create
► create(): T
Defined in PersistentModelObservable.ts:22
Factory method to create a new document in the collection
Returns: T
every
► every(callbackfn: function
, thisArg?: any
): boolean
Inherited from Array.every
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1201
Determines whether all the members of an array satisfy the specified test.
Parameters:
Param | Type | Description |
---|---|---|
callbackfn | function | A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array. |
thisArg | any | An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. |
Returns: boolean
filter
► filterS(callbackfn: function
, thisArg?: any
): S
[]
► filter(callbackfn: function
, thisArg?: any
): T
[]
Inherited from Array.filter
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1225
Returns the elements of an array that meet the condition specified in a callback function.
Type parameters:
T
S : Parameters:
Param | Type | Description |
---|---|---|
callbackfn | function | A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. |
thisArg | any | An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. |
Returns: S
[]
Inherited from Array.filter
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1231
Returns the elements of an array that meet the condition specified in a callback function.
Parameters:
Param | Type | Description |
---|---|---|
callbackfn | function | A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. |
thisArg | any | An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. |
Returns: T
[]
find
► find(predicate: function
, thisArg?: any
, fromIndex?: number
): T
⎮undefined
Inherited from IObservableArray.find
Defined in /Volumes/DATA/projects/graphstore/node_modules/mobx/lib/types/observablearray.d.ts:13
Parameters:
Param | Type | Description |
---|---|---|
predicate | function | - |
thisArg | any | - |
fromIndex | number | - |
Returns: T
⎮undefined
findIndex
► findIndex(predicate: function
, thisArg?: any
, fromIndex?: number
): number
Inherited from IObservableArray.findIndex
Defined in /Volumes/DATA/projects/graphstore/node_modules/mobx/lib/types/observablearray.d.ts:14
Parameters:
Param | Type | Description |
---|---|---|
predicate | function | - |
thisArg | any | - |
fromIndex | number | - |
Returns: number
forEach
► forEach(callbackfn: function
, thisArg?: any
): void
Inherited from Array.forEach
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1213
Performs the specified action for each element in an array.
Parameters:
Param | Type | Description |
---|---|---|
callbackfn | function | A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. |
thisArg | any | An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. |
Returns: void
indexOf
► indexOf(searchElement: T
, fromIndex?: number
): number
Inherited from Array.indexOf
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1189
Returns the index of the first occurrence of a value in an array.
Parameters:
Param | Type | Description |
---|---|---|
searchElement | T | The value to locate in the array. |
fromIndex | number | The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. |
Returns: number
intercept
► intercept(handler: IInterceptor
.<IArrayWillChange
.<T
>⎮IArrayWillSplice
.<T
>>): Lambda
► intercept(handler: IInterceptor
.<IArrayChange
.<T
>⎮IArraySplice
.<T
>>): Lambda
► interceptT(handler: IInterceptor
.<IArrayChange
.<T
>⎮IArraySplice
.<T
>>): Lambda
Inherited from IObservableArray.intercept
Defined in /Volumes/DATA/projects/graphstore/node_modules/mobx/lib/types/observablearray.d.ts:7
Parameters:
Param | Type | Description |
---|---|---|
handler | IInterceptor .<IArrayWillChange .<T >⎮IArrayWillSplice .<T >> | - |
Returns: Lambda
Inherited from IObservableArray.intercept
Defined in /Volumes/DATA/projects/graphstore/node_modules/mobx/lib/types/observablearray.d.ts:8
Parameters:
Param | Type | Description |
---|---|---|
handler | IInterceptor .<IArrayChange .<T >⎮IArraySplice .<T >> | - |
Returns: Lambda
Inherited from IObservableArray.intercept
Defined in /Volumes/DATA/projects/graphstore/node_modules/mobx/lib/types/observablearray.d.ts:9
Type parameters:
T
Parameters:
Param | Type | Description |
---|---|---|
handler | IInterceptor .<IArrayChange .<T >⎮IArraySplice .<T >> | - |
Returns: Lambda
join
► join(separator?: string
): string
Inherited from Array.join
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1146
Adds all the elements of an array separated by the specified separator string.
Parameters:
Param | Type | Description |
---|---|---|
separator | string | A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. |
Returns: string
lastIndexOf
► lastIndexOf(searchElement: T
, fromIndex?: number
): number
Inherited from Array.lastIndexOf
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1195
Returns the index of the last occurrence of a specified value in an array.
Parameters:
Param | Type | Description |
---|---|---|
searchElement | T | The value to locate in the array. |
fromIndex | number | The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. |
Returns: number
map
► mapU(callbackfn: function
, thisArg?: any
): U
[]
Inherited from Array.map
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1219
Calls a defined callback function on each element of an array, and returns an array that contains the results.
Type parameters:
U
Parameters:
Param | Type | Description |
---|---|---|
callbackfn | function | A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. |
thisArg | any | An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. |
Returns: U
[]
move
► move(fromIndex: number
, toIndex: number
): void
Inherited from IObservableArray.move
Defined in /Volumes/DATA/projects/graphstore/node_modules/mobx/lib/types/observablearray.d.ts:16
Parameters:
Param | Type | Description |
---|---|---|
fromIndex | number | - |
toIndex | number | - |
Returns: void
observe
► observe(listener: function
, fireImmediately?: boolean
): Lambda
Inherited from IObservableArray.observe
Defined in /Volumes/DATA/projects/graphstore/node_modules/mobx/lib/types/observablearray.d.ts:6
Parameters:
Param | Type | Description |
---|---|---|
listener | function | - |
fireImmediately | boolean | - |
Returns: Lambda
peek
► peek(): T
[]
Inherited from IObservableArray.peek
Defined in /Volumes/DATA/projects/graphstore/node_modules/mobx/lib/types/observablearray.d.ts:11
Returns: T
[]
pop
► pop(): T
⎮undefined
Inherited from Array.pop
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1131
Removes the last element from an array and returns it.
Returns: T
⎮undefined
push
► push(...items: T
[]): number
Inherited from Array.push
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1127
Appends new elements to an array, and returns the new length of the array.
Parameters:
Param | Type | Description |
---|---|---|
items | T [] | New elements of the Array. |
Returns: number
reduce
► reduce(callbackfn: function
): T
► reduce(callbackfn: function
, initialValue: T
): T
► reduceU(callbackfn: function
, initialValue: U
): U
Inherited from Array.reduce
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1237
Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Parameters:
Param | Type | Description |
---|---|---|
callbackfn | function | A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. |
Returns: T
Inherited from Array.reduce
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1238
Parameters:
Param | Type | Description |
---|---|---|
callbackfn | function | - |
initialValue | T | - |
Returns: T
Inherited from Array.reduce
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1244
Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Type parameters:
U
Parameters:
Param | Type | Description |
---|---|---|
callbackfn | function | A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. |
initialValue | U | If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. |
Returns: U
reduceRight
► reduceRight(callbackfn: function
): T
► reduceRight(callbackfn: function
, initialValue: T
): T
► reduceRightU(callbackfn: function
, initialValue: U
): U
Inherited from Array.reduceRight
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1250
Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Parameters:
Param | Type | Description |
---|---|---|
callbackfn | function | A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. |
Returns: T
Inherited from Array.reduceRight
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1251
Parameters:
Param | Type | Description |
---|---|---|
callbackfn | function | - |
initialValue | T | - |
Returns: T
Inherited from Array.reduceRight
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1257
Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Type parameters:
U
Parameters:
Param | Type | Description |
---|---|---|
callbackfn | function | A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. |
initialValue | U | If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. |
Returns: U
remove
► remove(value: T
): boolean
Inherited from IObservableArray.remove
Defined in /Volumes/DATA/projects/graphstore/node_modules/mobx/lib/types/observablearray.d.ts:15
Parameters:
Param | Type | Description |
---|---|---|
value | T | - |
Returns: boolean
replace
► replace(newItems: T
[]): T
[]
Inherited from IObservableArray.replace
Defined in /Volumes/DATA/projects/graphstore/node_modules/mobx/lib/types/observablearray.d.ts:12
Parameters:
Param | Type | Description |
---|---|---|
newItems | T [] | - |
Returns: T
[]
reverse
► reverse(): T
[]
Inherited from Array.reverse
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1150
Reverses the elements in an Array.
Returns: T
[]
shift
► shift(): T
⎮undefined
Inherited from Array.shift
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1154
Removes the first element from an array and returns it.
Returns: T
⎮undefined
slice
► slice(start?: number
, end?: number
): T
[]
Inherited from Array.slice
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1160
Returns a section of an array.
Parameters:
Param | Type | Description |
---|---|---|
start | number | The beginning of the specified portion of the array. |
end | number | The end of the specified portion of the array. |
Returns: T
[]
some
► some(callbackfn: function
, thisArg?: any
): boolean
Inherited from Array.some
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1207
Determines whether the specified callback function returns true for any element of an array.
Parameters:
Param | Type | Description |
---|---|---|
callbackfn | function | A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array. |
thisArg | any | An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. |
Returns: boolean
sort
► sort(compareFn?: function
): this
Inherited from Array.sort
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1165
Sorts an array.
Parameters:
Param | Type | Description |
---|---|---|
compareFn | function | The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order. |
Returns: this
splice
► splice(start: number
, deleteCount?: number
): T
[]
► splice(start: number
, deleteCount: number
, ...items: T
[]): T
[]
Inherited from Array.splice
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1171
Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
Parameters:
Param | Type | Description |
---|---|---|
start | number | The zero-based location in the array from which to start removing elements. |
deleteCount | number | The number of elements to remove. |
Returns: T
[]
Inherited from Array.splice
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1178
Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
Parameters:
Param | Type | Description |
---|---|---|
start | number | The zero-based location in the array from which to start removing elements. |
deleteCount | number | The number of elements to remove. |
items | T [] | Elements to insert into the array in place of the deleted elements. |
Returns: T
[]
spliceWithArray
► spliceWithArray(index: number
, deleteCount?: number
, newItems?: T
[]): T
[]
Inherited from IObservableArray.spliceWithArray
Defined in /Volumes/DATA/projects/graphstore/node_modules/mobx/lib/types/observablearray.d.ts:5
Parameters:
Param | Type | Description |
---|---|---|
index | number | - |
deleteCount | number | - |
newItems | T [] | - |
Returns: T
[]
toLocaleString
► toLocaleString(): string
Inherited from Array.toLocaleString
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1122
Returns a string representation of an array. The elements are converted to string using thier toLocalString methods.
Returns: string
toString
► toString(): string
Inherited from Array.toString
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1118
Returns a string representation of an array.
Returns: string
unshift
► unshift(...items: T
[]): number
Inherited from Array.unshift
Defined in /Volumes/DATA/projects/graphstore/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts:1183
Inserts new elements at the start of an array.
Parameters:
Param | Type | Description |
---|---|---|
items | T [] | Elements to insert at the start of the Array. |
Returns: number