//#region src/sized/set.d.ts /** * A _Set_ with a maximum size * * Behavior is similar to a _LRU_ cache, where the oldest values are removed */ declare class SizedSet extends Set { #private; /** * Is the _Set_ full? */ get full(): boolean; get maximum(): number; /** * Create a new _SizedSet_ with values and a maximum size _(2^20)_ * * @param values Array of values to initialize the _SizedSet_ with * @template Value Type of the values in the _SizedSet_ */ constructor(values: Value[]); /** * Create a new _SizedSet_ with a maximum size _(but clamped at 2^24)_ * * @param maximum Maximum size of the _SizedSet_ _(defaults to 2^20; clamped at 2^24)_ * @template Value Type of the values in the _SizedSet_ */ constructor(maximum: number); /** * Create a new _SizedSet_ with _(optional)_ values and a maximum size * * @param values Array of values to initialize the _SizedSet_ with * @param maximum Maximum size of the _SizedSet_ _(defaults to 2^20; clamped at 2^24)_ * @template Value Type of the values in the _SizedSet_ */ constructor(values?: Value[], maximum?: number); /** * @inheritdoc */ add(value: Value): this; /** * Get a value from the _SizedSet_, if it exists _(and optionally move it to the end)_ * * @param value Value to get from the _SizedSet_ * @param update Update the value's position in the _SizedSet_? _(defaults to `false`)_ * @returns Found value if it exists, otherwise `undefined` */ get(value: Value, update?: boolean): Value | undefined; } //#endregion export { SizedSet };