export type RPCContext = { headers: Record; req?: any; env?: any; ws?: any; waitUntil?: (p: Promise) => void; }; export type MaybePromise = T | Promise; export type ProcedureType = 'query' | 'mutation'; export type Merge = Omit & B; export type MiddlewareFn = (options: { context: Context; input: I; next: (context: Merge) => Promise; }) => MaybePromise; export type Procedure = { type: ProcedureType; meta?: any; resolve: (options: { context: Context; input: I; }) => Promise; };