NonPostableEvt<T> and StatefulReadonlyEvt<T> are interfaces implemented respectively by the classes Evt<T> and StatefulEvt<T>. They contains all the methods but the ones used to post events, namely: .post(), .postOnceHandled() and the .state setter for StatefulReadonlyEvt
import { Evt, NonPostableEvt } from"evt";constevtText=newEvt<string>();//Api to expose.exportconstapi:{ evtText:NonPostableEvt<string>; } = { evtText };//evtText exposed by the api cannot be posted…api.evtText.post //<=== TS error api.evtText.postOnceMatched //<===== TS error//…but we can post internally.evtText.post("good");