Skip to content

Commit

Permalink
Fix type errors in e2e client
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-dp committed Jun 28, 2024
1 parent f7306a2 commit 224abb6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions e2e/satellite_client/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
import { schema as noDalSchema } from './generated/client/db-description'
export { JsonNull } from './generated/client'
import { globalRegistry } from 'electric-sql/satellite'
import { QualifiedTablename, SatelliteErrorCode } from 'electric-sql/util'
import { QualifiedTablename, ReplicatedRowTransformer, SatelliteErrorCode } from 'electric-sql/util'
import { Shape } from 'electric-sql/satellite'
import {
pgBuilder,
Expand All @@ -31,6 +31,7 @@ import {
import type { AnyTable, AnyTableSchema } from 'electric-sql/client'
import { Row } from 'electric-sql/util'
import { dedent } from 'ts-dedent'
import { Prisma } from './generated/client/prismaClient'

setLogLevel('DEBUG')

Expand Down Expand Up @@ -126,8 +127,8 @@ export const electrify_db = async (
}

const electric = isPostgresDb(process.env.DIALECT, db)
? await electrifyPg(db, schema, config)
: await electrifySqlite(db, schema, config)
? await electrifyPg(db, schema, config) as Electric
: await electrifySqlite(db, schema, config) as Electric

const token = await mockSecureAuthToken(exp)

Expand Down Expand Up @@ -1132,7 +1133,7 @@ const replicationTransformer = {
}

const set_item_replication_transform_dal = (electric: Electric) => {
electric.db.items.setReplicationTransform(replicationTransformer)
electric.db.items.setReplicationTransform(replicationTransformer as unknown as ReplicatedRowTransformer<Prisma.ItemsUncheckedCreateInput>)
}

const set_item_replication_transform_raw = (electric: Electric) => {
Expand Down

0 comments on commit 224abb6

Please sign in to comment.