Skip to content

Instantly share code, notes, and snippets.

@rubys
Created May 20, 2023 20:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rubys/65524a2d6d286cb61faf94b3353d3b9e to your computer and use it in GitHub Desktop.
Save rubys/65524a2d6d286cb61faf94b3353d3b9e to your computer and use it in GitHub Desktop.
m -rf drizzle-test
mkdir drizzle-test
cd drizzle-test
echo "{}" > package.json
npm install drizzle-orm pg
npm install -D drizzle-kit @types/pg typescript
echo "import { pgTable } from 'drizzle-orm/pg-core';" > test.ts
npx tsc test.ts
added 17 packages, and audited 18 packages in 10s
found 0 vulnerabilities
added 46 packages, and audited 64 packages in 9s
5 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
node_modules/drizzle-orm/db.d-bc9a1d6c.d.ts:521:15 - error TS2515: Non-abstract class 'PgSelect<TTableName, TSelection, TSelectMode, TNullabilityMap>' does not implement inherited abstract member 'getSQL' from class 'PgSelectQueryBuilder<PgSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap>'.
521 declare class PgSelect<TTableName extends string | undefined, TSelection, TSelectMode extends SelectMode, TNullabilityMap extends Record<string, JoinNullability> = TTableName extends string ? Record<TTableName, 'not-null'> : {}> extends PgSelectQueryBuilder<PgSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap> {
~~~~~~~~
node_modules/drizzle-orm/db.d-bc9a1d6c.d.ts:655:15 - error TS2420: Class 'PgDelete<TTable, TQueryResult, TReturning>' incorrectly implements interface 'SQLWrapper'.
Property 'getSQL' is missing in type 'PgDelete<TTable, TQueryResult, TReturning>' but required in type 'SQLWrapper'.
655 declare class PgDelete<TTable extends AnyPgTable, TQueryResult extends QueryResultHKT, TReturning extends Record<string, unknown> | undefined = undefined> extends QueryPromise<TReturning extends undefined ? QueryResultKind<TQueryResult, never> : TReturning[]> implements SQLWrapper {
~~~~~~~~
node_modules/drizzle-orm/column.d-c31e7ad3.d.ts:257:5
257 getSQL(): SQL;
~~~~~~~~~~~~~~
'getSQL' is declared here.
Found 2 errors in the same file, starting at: node_modules/drizzle-orm/db.d-bc9a1d6c.d.ts:521
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment