collect-your-stuff
    Preparing search index...

    Class ScopedCollection<Scope, Key, Value>

    A keyed collection, partitioned by an arbitrary scope object: values are stored and looked up by key, with a separate key space per scope. Scopes are held by a WeakMap, so a scope that nothing else references any more takes its whole key space with it - useful anywhere state needs to be tracked per instance of something (a tree's root, a session) without that something needing to hold the state itself.

    Type Parameters

    • Scope extends object = object
    • Key = any
    • Value = any

    Implements

    Index