a tool for shared writing and social publishing

fix type of getClientGroup

+2 -3
+2 -3
src/replicache/utils.ts
··· 4 import { replicache_clients } from "drizzle/schema"; 5 import type { Attribute, FilterAttributes } from "./attributes"; 6 import { ReadTransaction, WriteTransaction } from "replicache"; 7 8 export function FactWithIndexes(f: Fact<Attribute>) { 9 let indexes: { 10 eav: string; 11 - aev: string; 12 vae?: string; 13 } = { 14 eav: `${f.entity}-${f.attribute}-${f.id}`, 15 - aev: `${f.attribute}-${f.entity}-${f.id}`, 16 }; 17 if ( 18 f.data.type === "reference" || ··· 24 } 25 26 export async function getClientGroup( 27 - db: PostgresJsDatabase, 28 clientGroupID: string, 29 ): Promise<{ [clientID: string]: number }> { 30 let data = await db
··· 4 import { replicache_clients } from "drizzle/schema"; 5 import type { Attribute, FilterAttributes } from "./attributes"; 6 import { ReadTransaction, WriteTransaction } from "replicache"; 7 + import { PgTransaction } from "drizzle-orm/pg-core"; 8 9 export function FactWithIndexes(f: Fact<Attribute>) { 10 let indexes: { 11 eav: string; 12 vae?: string; 13 } = { 14 eav: `${f.entity}-${f.attribute}-${f.id}`, 15 }; 16 if ( 17 f.data.type === "reference" || ··· 23 } 24 25 export async function getClientGroup( 26 + db: PgTransaction<any, any, any>, 27 clientGroupID: string, 28 ): Promise<{ [clientID: string]: number }> { 29 let data = await db