message: fix: union hack
diff: @@ -233,9 +233,8 @@ export type MsgType = keyof MessageConfig
  // 'extends' hack to generate union
  // https://www.typescriptlang.org/docs/handbook/advanced-types.html#distributive-conditional-types
  -export type Message<
  - T extends MsgType = MsgType
  -> = MessageConfig[T]['payload'] extends undefined
  +export type Message<T extends MsgType = MsgType> = T extends any
  + ? MessageConfig[T]['payload'] extends undefined
  ? Readonly<{
  type: T
  payload?: MessageConfig[T]['payload']
  @@ -244,6 +243,7 @@ export type Message<
  type: T
  payload: MessageConfig[T]['payload']
  }>
  + : never
  export type MessageResponse<T extends MsgType> = Readonly<
  MessageConfig[T]['response']
  