A collection reads like a ReadonlyArray: it indexes ([i]), counts (length), iterates, and
offers the familiar helpers (at, find, filter, map, ...). It is not an array —
Array.isArray is false and it cannot be written through [i] — so call toArray when
an array is really wanted.
Iteration order is the collection's own order — insertion order for the ordered collections
(sheets, tables, movables) and unspecified for the keyed ones (resources, functions). Every
read is over a snapshot: neither getItems nor the helpers observe a change made while
they run.
Interface used for all ICollections.
Remarks
A collection reads like a
ReadonlyArray: it indexes ([i]), counts (length), iterates, and offers the familiar helpers (at,find,filter,map, ...). It is not an array —Array.isArrayisfalseand it cannot be written through[i]— so call toArray when an array is really wanted.Iteration order is the collection's own order — insertion order for the ordered collections (sheets, tables, movables) and unspecified for the keyed ones (resources, functions). Every read is over a snapshot: neither getItems nor the helpers observe a change made while they run.
See
Interface
ICollection