Skip to content

Instantly share code, notes, and snippets.

@huntz20
Created March 17, 2021 13:49
Show Gist options
  • Save huntz20/c8965fa32ef169aec44769743f5b6c03 to your computer and use it in GitHub Desktop.
Save huntz20/c8965fa32ef169aec44769743f5b6c03 to your computer and use it in GitHub Desktop.
type usePubSubType = <T>(
eventName: string,
observer?: (props: T) => void
) => readonly [unsub: () => void, dispatcher: (args: T) => void];
type useItemReducerType = <E, A, R>(state: E, action: A, Repository: R) => E;
declare module "@sinbad/sinbad-utility" {
const usePubSub: usePubSubType;
const useItemReducer: useItemReducerType;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment