ArrayIndexed <T>
Hierarchy
- Array<T>
- ArrayIndexed
Index
Constructors
constructor
Type parameters
- T
Parameters
indexKey: string
optionalitems: any[]
optionaloptions: { autoId?: boolean; unique?: boolean }
Returns ArrayIndexed<T>
Properties
dict
Type declaration
[key string]: any
key
nextId
options
Type declaration
autoId: boolean
unique: boolean
Methods
clear
Returns this
delete
Parameters
id: string | number
Returns void
deleteById
Parameters
id: string | number
Returns void
findById
Parameters
id: string | number
Returns T
get
Parameters
id: string | number
Returns any
pop
Returns T
push
Parameters
rest...items: T[]
Returns number
reindex
Returns void
sort
Parameters
optionalcompareFn: (a: T, b: T) => number
Returns this
splice
Parameters
start: number
optionaldeleteCount: number
Returns T[]
toObject
Returns Record<string, T>
update
Parameters
data: {}
Returns boolean | T
Extension of the default Array class that adds indexing methods