import { _A, _E, TakeSym } from "@effect/core/stream/Take/definition" export class TakeInternal implements Take { readonly [TakeSym]: TakeSym = TakeSym readonly [_E]!: () => E readonly [_A]!: () => A constructor(readonly _exit: Exit, Chunk>) {} [Hash.sym](): number { return this._exit[Hash.sym]() } [Equals.sym](u: unknown): boolean { if (isTake(u)) { concreteTake(u) return u._exit == this._exit } return false } } /** * @tsplus static effect/core/stream/Take.Ops isTake */ export function isTake(u: unknown): u is Take { return typeof u === "object" && u != null && TakeSym in u } /** * @tsplus macro remove */ export function concreteTake(_: Take): asserts _ is TakeInternal { // }