export type InferPatchResult<S, IdOrNullable = any> = S extends {
  patch: (id: Id, data: any, params: any) => infer R;
}
  ? IdOrNullable extends Id
    ? Single<Awaited<R>>