import type { WSEvent } from './gen/models'; export type UpdateStateResult = T & { changed: boolean; }; export type FromArray = T extends Array ? L : never; export type EventPayload = Extract< WSEvent, { type: T } >; export type PartializeAllBut = { [P in K]-?: T[P]; } & { [P in Exclude]?: T[P] }; export type CommonProps = { [K in keyof A & keyof B]: A[K] & B[K]; };