import { EventBus, createEventDefinition } from "ts-bus";
export const fetchJobs = createEventDefinition<{ searchText: string }>()(
"search_jobs"
);
const bus = new EventBus();
bus.subscribe(fetchJobs, event => {
// event here is typed as BusEvent<any> and not {type:"search_jobs", payload: {searchText:string}}
});
Not sure how this crept in.