Ende.ValidBindings
type alias ยท desktop apps only
type Ende.ValidBindings<T> = { [K in keyof T]: T[K] extends (...args: infer A) => Promise<infer P> ? [A, P] extends [BrowserWindowSerializable<A>, BrowserWindowSerializable<P>] ? T[K] : never : never }Constrains T to a record of async binding functions taking and resolving with serializable values.
Each handler is validated and then passed through unchanged, so that
BrowserWindow.bind keeps the caller's own parameter types.
Replacing T[K] with a common supertype here would instead force every
handler's parameters to be checked contravariantly against that
supertype, rejecting any handler that narrows them.