Wrap a handler/listener function into a channel definition tagged with its kind (handler vs listener) and whether it should only fire once.
handler
listener
once
Prefer the createIpcHelpers helpers (handle, listen, …) over calling this directly — they preset the type argument for you.
handle
listen
type
One of handle, handleOnce, listen, listenOnce.
handleOnce
listenOnce
The handler (for handle*) or listener (for listen*) callback.
handle*
listen*
Wrap a handler/listener function into a channel definition tagged with its kind (
handlervslistener) and whether it should only fireonce.Prefer the createIpcHelpers helpers (
handle,listen, …) over calling this directly — they preset thetypeargument for you.