import { Build } from "./utils";

declare global {
  /**
   * Builds a generator from an array.
   * @returns A generator with the same type as the array.
   */
  interface Array<T> {
    geninq(): Generator<T, void, unknown>;
  }
}

Array.prototype.geninq = function* () {
  for (const item of this) {
    yield item;
  }
};
