![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mets-rebuild.corals.io/wp-content/metras.v32.1/node_modules/rxjs/src/util/ |
import { root } from './root'; export interface ISetCtor { new<T>(): ISet<T>; } export interface ISet<T> { add(value: T): void; has(value: T): boolean; size: number; clear(): void; } export function minimalSetImpl<T>(): ISetCtor { // THIS IS NOT a full impl of Set, this is just the minimum // bits of functionality we need for this library. return class MinimalSet<T> implements ISet<T> { private _values: T[] = []; add(value: T): void { if (!this.has(value)) { this._values.push(value); } } has(value: T): boolean { return this._values.indexOf(value) !== -1; } get size(): number { return this._values.length; } clear(): void { this._values.length = 0; } }; } export const Set: ISetCtor = root.Set || minimalSetImpl();