Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/evt/lib/types/helper/SwapEvtType.ts

💧EventEmitter's typesafe replacement
Latest
File
import type { StatefulEvtLike, StatefulEvt, StatefulReadonlyEvtLike, StatefulReadonlyEvt, EvtLike, Evt, NonPostableEvtLike, NonPostableEvt} from "../interfaces/index.ts";
/** https://docs.evt.land/api/helpertypes#swapevttype-less-than-e-t-greater-than */export type SwapEvtType<E extends NonPostableEvtLike<any>, T> = E extends StatefulEvtLike<any> ? StatefulEvt<T> : E extends StatefulReadonlyEvtLike<any> ? StatefulReadonlyEvt<T> : E extends EvtLike<any> ? Evt<T> : NonPostableEvt<T> ;