Preview environment

interface LimitedCollectionOptions

export interface LimitedCollectionOptions<Key, Value>

Options for defining the behavior of a LimitedCollection

Type Parameters

Key

Value

optional
keepOverLimit? : (value: Value, key: Key, collection: LimitedCollection<Key, Value>) => boolean

A function, which is passed the value and key of an entry, ran to decide to keep an entry past the maximum size

optional
maxSize? : number

The maximum size of the Collection (default: Infinity)