Open
Description
kysely-postgres-js/src/types.ts
Line 3 in 30fd344
this is using Sql
from the npm postgres package: https://github.com/kysely-org/kysely-postgres-js/blob/main/package.json#L39
it should instead use Sql
from the postgresJS package: https://github.com/porsager/postgres/blob/master/types/index.d.ts#L660C19-L660C56
Currently I am getting a type error because it tells me that my postgresConnection = postgres(...)
is not allowed:
import { PostgresJSDialect, PostgresJSDialectConfig } from "kysely-postgres-js";
const databaseConfig: PostgresJSDialectConfig = {
postgres: postgresConnection, // gives me TS error
};
You can see here that it is getting the TYPE from the NPMJS registry for POSTGRES, instead of using POSGRESJS driver
Type 'import("https://deno.land/x/[email protected]/types/index").Sql<{}>' is not assignable to type 'import("file:///Users/jose/Library/Caches/deno/npm/registry.npmjs.org/postgres/3.4.4/types/index").Sql<{}>'. Types of property 'types' are incompatible. Type '(<T>(value: T, oid: number) => import("https://deno.land/x/[email protected]/types/index").Parameter<T>) & {}' is not assignable to type '(<T>(value: T, oid: number) => import("file:///Users/jose/Library/Caches/deno/npm/registry.npmjs.org/postgres/3.4.4/types/index").Parameter<T>) & {}'. Type '(<T>(value: T, oid: number) => Parameter<T>) & {}' is not assignable to type '<T>(value: T, oid: number) => Parameter<T>'. Property '[PRIVATE]' is missing in type 'import("https://deno.land/x/[email protected]/types/index").Parameter<T>' but required in type 'import("file:///Users/jose/Library/Caches/deno/npm/registry.npmjs.org/postgres/3.4.4/types/index").Parameter<T>'.
Metadata
Metadata
Assignees
Labels
No labels