Skip to main content
Module

x/evt/lib/Evt.factorize.ts

šŸ’§EventEmitter's typesafe replacement
Go to Latest
File
import type { FactorizeEvt, NonPostableEvtLike } from "./types/index.ts";
/** https://docs.evt.land/api/evt/factorize */export function factorize<E extends NonPostableEvtLike<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;*/