123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105//NOTE: Type only
import * as _ from "../lib/index.ts";
_.dom.__hack;
{
type T = void; type Source = _.Evt<void>;
type A = _.ToNonPostableEvt<Source>;
const x: _.NonPostableEvt<T> = null as any as A;x;
type B = _.ToPostableEvt<A>
const y: Source = null as any as B;y;
}{ type T = undefined; type Source = _.Evt<T>;
type A = _.ToNonPostableEvt<Source>;
const x: _.NonPostableEvt<T> = null as any as A;x;
type B = _.ToPostableEvt<A>
const y: B = null as any as Source; y;
}{ type T = undefined | number; type Source = _.Evt<T>;
type A = _.ToNonPostableEvt<Source>;
const x: _.NonPostableEvt<T> = null as any as A;x;
type B = _.ToPostableEvt<A>
const y: B = null as any as Source; y;
}{ type T = undefined; type Source = _.StatefulEvt<T>;
type A = _.ToNonPostableEvt<Source>;
const x: _.StatefulReadonlyEvt<T> = null as any as A;x;
type B = _.ToPostableEvt<A>
const y: B = null as any as Source; y;
}{ type T = undefined | number; type Source = _.StatefulEvt<T>;
type A = _.ToNonPostableEvt<Source>;
const x: _.StatefulReadonlyEvt<T> = null as any as A;x;
type B = _.ToPostableEvt<A>
const y: B = null as any as Source; y;
}
{
type Source = { evtText: _.Evt<string | number>; evtIsConnected: _.StatefulReadonlyEvt<boolean | number>; evtTime: _.NonPostableEvt<number | Date>; evtTime2: _.StatefulReadonlyEvt<number | Date>; p: number; };
type A = _.ToNonPostableEvt<Source>;
const x: { evtText: _.NonPostableEvt<string | number>; evtIsConnected: _.StatefulReadonlyEvt<number | boolean>; evtTime: _.NonPostableEvt<number | Date>; evtTime2: _.StatefulReadonlyEvt<number | Date>; p: number; }= null as any as A; x;
type B= _.ToPostableEvt<A>;
const y: { evtText: _.Evt<string | number>; evtIsConnected: _.StatefulEvt<number | boolean>; evtTime: _.Evt<number | Date>; evtTime2: _.StatefulEvt<number | Date>; p: number; }= null as any as B; y;
}
console.log("PASS");