Library API
    Preparing search index...

    Class ScopedSet<T>

    A lightweight Set-compatible container that delegates has() lookups to a parent Set/ScopedSet, but confines add() writes to its own-local storage.

    This mirrors JavaScript prototype-chain semantics:

    • Values added to the parent are visible to the child via has().
    • Values added to the child are isolated from the parent; the parent Set is never modified by child add() calls.
    const global = new Set(['a']);
    const sandbox = new ScopedSet(global);
    sandbox.has('a'); // true (inherited from parent)
    sandbox.add('b');
    sandbox.has('b'); // true (own-local)
    global.has('b'); // false (never written to parent)

    Type Parameters

    • T
    Index