import type { AxTunable, AxUsable } from './types.js'; type AxInstanceRegistryItem, IN, OUT> = T & AxUsable; export class AxInstanceRegistry, IN, OUT> { private reg: Set>; // To track keys for iteration constructor() { this.reg = new Set(); } register(instance: AxInstanceRegistryItem): void { this.reg.add(instance); } *[Symbol.iterator]() { const items = Array.from(this.reg); for (let i = 0; i < items.length; i++) { yield items[i]; } } }