OptionalserializeItem: (item: T) => S & { "[moduleIdSymbol]"?: string }optional function to serialize an item, defaults to returning item.toJSON or item: i => (i.toJSON || i)
OptionaldeserializeItem: (item: S) => T | Promise<T> | nulloptional deserialization function. defaults to returning the passed object: i => i
Optionalctor: new (...args: any[]) => Toptional constructor to validate deserialized items against. if passed, deserializeItem must be an instance of ctor.
OptionaldetermineShadowIndex: (item: T, shadow?: T, index?: number) => number | null | undefinedreturn the index where a shadow should be inserted. only has relevance, if the collection is indexed. previous and current index may be null.
function to get the current dynamic module id