Evt.loosenType(evt)
import { Evt } from "evt";
declare const evFooBar: Evt<"FOO" | "BAR">;
declare function myFunc(evtText: Evt<string>): void;
myFunc(evtFooBar); //Gives a type error;
myFunc(Evt.loosenType(evtFooBar)); //OKLast updated
Was this helpful?