x/evt@v1.11.2/lib/Evt.factorize.ts

šŸ’§EventEmitter's typesafe replacement
GitHub Stars
382
Go to Latest


type FactorizeEvt<E extends import("./types/helper/UnpackEvt.ts").EvtLike<any>> = import("./types/helper/FactorizeEvt.ts").FactorizeEvt<E>;
type EvtLike<T> = import("./types/helper/UnpackEvt.ts").EvtLike<T>;
/** https://docs.evt.land/api/evt/factorize */export function factorize<E extends EvtLike<any>>( evt: E): FactorizeEvt<E> { return evt as any;}
/*import { Evt } from "./Evt.ts";const x: Evt<boolean> = loosenType(new Evt<true>()); x;const y: Evt<boolean> = loosenType(new Evt<number>()); y;*/