import { Entity } from "./entity";
import { GeneralUpdateOperation } from "sp2";

export type CustomQueryResult<QR extends Object = Object> = {
  result: QR;
};

export type QueryResult<E extends Entity = Entity> = {
  entities: E[];
  versionsById: { [entityId: string]: string | null };
};

export type SingleQueryResult<E extends Entity = Entity> = {
  entity: E;
  versionId: string | null;
};

export type PullQueryResult<E extends Entity = Entity> =
  | {
      pulled: 1;
      operations: GeneralUpdateOperation[];
      versionId: string | null;
    }
  | SingleQueryResult<E>;

import { Entity } from "./entity";
import { GeneralUpdateOperation } from "sp2";

export type CustomQueryResult<QR extends Object = Object> = {
  result: QR;
};

export type QueryResult<E extends Entity> = {
  entities: E[];
  versionsById: { [entityId: string]: string | null };
};

export type SingleQueryResult<E extends Entity> = {
  entity: E;
  versionId: string | null;
};

export type PullQueryResult<E extends Entity> =
  | {
      pulled: 1;
      operations: GeneralUpdateOperation[];
      versionId: string | null;
    }
  | SingleQueryResult<E>;

--- 
+++ 
@@ -5,17 +5,17 @@
   result: QR;
 };
 
-export type QueryResult<E extends Entity> = {
+export type QueryResult<E extends Entity = Entity> = {
   entities: E[];
   versionsById: { [entityId: string]: string | null };
 };
 
-export type SingleQueryResult<E extends Entity> = {
+export type SingleQueryResult<E extends Entity = Entity> = {
   entity: E;
   versionId: string | null;
 };
 
-export type PullQueryResult<E extends Entity> =
+export type PullQueryResult<E extends Entity = Entity> =
   | {
       pulled: 1;
       operations: GeneralUpdateOperation[];
Add default types to QueryResults
