drizzle-team / drizzle-team/drizzle-orm

[BUG]:bug in build with ts

Open
#4,818 5 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Report hasn't been filed before.

- [x] I have verified that the bug I'm about to report hasn't been filed before.

### What version of `drizzle-orm` are you using?

0.44.4

### What version of `drizzle-kit` are you using?

0.31.4

### Other packages

"pg": "^8.16.3",

### Describe the Bug

hi i devloping a package and when i want build it i have this errors. i dont run project
```
//ts config
{
"compilerOptions": {
"target": "ES2019",
"module": "commonjs",
"declaration": true,
"outDir": "dist",
"rootDir": "src",
"strict": true,
"esModuleInterop": true
},
"include": [
"src",
]
}
```
ts version: 5.8.3
```
node_modules/drizzle-orm/gel-core/query-builders/query.d.ts:23:22 - error TS2420: Class 'GelRelationalQuery' incorrectly implements interface 'SQLWrapper'.
Property 'getSQL' is missing in type 'GelRelationalQuery' but required in type 'SQLWrapper'.

23 export declare class GelRelationalQuery extends QueryPromise implements RunnableQuery, SQLWrapper {
~~~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/sql/sql.d.ts:50:5
50 getSQL(): SQL;
~~~~~~~~~~~~~~
'getSQL' is declared here.

node_modules/drizzle-orm/gel-core/roles.d.ts:7:22 - error TS2559: Type 'GelRole' has no properties in common with type 'GelRoleConfig'.

7 export declare class GelRole implements GelRoleConfig {
~~~~~~~

node_modules/drizzle-orm/mysql-core/db.d.ts:1:38 - error TS2307: Cannot find module 'mysql2/promise' or its corresponding type declarations.

1 import type { ResultSetHeader } from 'mysql2/promise';
~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/mysql-core/query-builders/delete.d.ts:36:22 - error TS2420: Class 'MySqlDeleteBase' incorrectly implements interface 'SQLWrapper'.
Property 'getSQL' is missing in type 'MySqlDeleteBase' but required in type 'SQLWrapper'.

36 export declare class MySqlDeleteBase extends QueryPromise> implements SQLWrapper {
~~~~~~~~~~~~~~~

node_modules/drizzle-orm/sql/sql.d.ts:50:5
50 getSQL(): SQL;
~~~~~~~~~~~~~~
'getSQL' is declared here.

node_modules/drizzle-orm/mysql-core/query-builders/select.d.ts:294:244 - error TS2344: Type 'string' does not satisfy the constraint 'keyof this & string'.
Type 'string' is not assignable to type 'keyof this & string'.
Type 'string' is not assignable to type 'keyof this'.
Type '"session"' is not assignable to type '"offset" | "limit" | "_" | "getSQL" | "as" | "union" | "intersect" | "except" | "for" | "where" | "orderBy" | "leftJoin" | "rightJoin" | "innerJoin" | "toSQL" | "$dynamic" | "having" | ... 8 more ... | "$withCache"'.

294 union: >(rightSelection: ((setOperators: GetMySqlSetOperators) => SetOperatorRightSelect) | SetOperatorRightSelect) => MySqlSelectWithout;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/mysql-core/query-builders/select.d.ts:320:247 - error TS2344: Type 'string' does not satisfy the constraint 'keyof this & string'.
Type 'string' is not assignable to type 'keyof this & string'.
Type 'string' is not assignable to type 'keyof this'.
Type '"session"' is not assignable to type '"offset" | "limit" | "_" | "getSQL" | "as" | "union" | "intersect" | "except" | "for" | "where" | "orderBy" | "leftJoin" | "rightJoin" | "innerJoin" | "toSQL" | "$dynamic" | "having" | ... 8 more ... | "$withCache"'.

320 unionAll: >(rightSelection: ((setOperators: GetMySqlSetOperators) => SetOperatorRightSelect) | SetOperatorRightSelect) => MySqlSelectWithout;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/mysql-core/query-builders/select.d.ts:346:248 - error TS2344: Type 'string' does not satisfy the constraint 'keyof this & string'.
Type 'string' is not assignable to type 'keyof this & string'.
Type 'string' is not assignable to type 'keyof this'.
Type '"session"' is not assignable to type '"offset" | "limit" | "_" | "getSQL" | "as" | "union" | "intersect" | "except" | "for" | "where" | "orderBy" | "leftJoin" | "rightJoin" | "innerJoin" | "toSQL" | "$dynamic" | "having" | ... 8 more ... | "$withCache"'.

346 intersect: >(rightSelection: ((setOperators: GetMySqlSetOperators) => SetOperatorRightSelect) | SetOperatorRightSelect) => MySqlSelectWithout;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/mysql-core/query-builders/select.d.ts:387:251 - error TS2344: Type 'string' does not satisfy the constraint 'keyof this & string'.
Type 'string' is not assignable to type 'keyof this & string'.
Type 'string' is not assignable to type 'keyof this'.
Type '"session"' is not assignable to type '"offset" | "limit" | "_" | "getSQL" | "as" | "union" | "intersect" | "except" | "for" | "where" | "orderBy" | "leftJoin" | "rightJoin" | "innerJoin" | "toSQL" | "$dynamic" | "having" | ... 8 more ... | "$withCache"'.

387 intersectAll: >(rightSelection: ((setOperators: GetMySqlSetOperators) => SetOperatorRightSelect) | SetOperatorRightSelect) => MySqlSelectWithout;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/mysql-core/query-builders/select.d.ts:413:245 - error TS2344: Type 'string' does not satisfy the constraint 'keyof this & string'.
Type 'string' is not assignable to type 'keyof this & string'.
Type 'string' is not assignable to type 'keyof this'.
Type '"session"' is not assignable to type '"offset" | "limit" | "_" | "getSQL" | "as" | "union" | "intersect" | "except" | "for" | "where" | "orderBy" | "leftJoin" | "rightJoin" | "innerJoin" | "toSQL" | "$dynamic" | "having" | ... 8 more ... | "$withCache"'.

413 except: >(rightSelection: ((setOperators: GetMySqlSetOperators) => SetOperatorRightSelect) | SetOperatorRightSelect) => MySqlSelectWithout;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/mysql-core/query-builders/select.d.ts:454:248 - error TS2344: Type 'string' does not satisfy the constraint 'keyof this & string'.
Type 'string' is not assignable to type 'keyof this & string'.
Type 'string' is not assignable to type 'keyof this'.
Type '"session"' is not assignable to type '"offset" | "limit" | "_" | "getSQL" | "as" | "union" | "intersect" | "except" | "for" | "where" | "orderBy" | "leftJoin" | "rightJoin" | "innerJoin" | "toSQL" | "$dynamic" | "having" | ... 8 more ... | "$withCache"'.

454 exceptAll: >(rightSelection: ((setOperators: GetMySqlSetOperators) => SetOperatorRightSelect) | SetOperatorRightSelect) => MySqlSelectWithout;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/mysql-core/query-builders/select.d.ts:611:22 - error TS2515: Non-abstract class 'MySqlSelectBase' does not implement inherited abstract member getSQL from class 'MySqlSelectQueryBuilderBase'.

611 export declare class MySqlSelectBase = TTableName extends string ? Record : {}, TDynamic extends boolean = false, TExcludedMethods extends string = never, TResult = SelectResult[], TSelectedFields = BuildSubquerySelection> extends MySqlSelectQueryBuilderBase {
~~~~~~~~~~~~~~~

node_modules/drizzle-orm/mysql-core/query-builders/select.types.d.ts:138:1149 - error TS2344: Type 'MySqlSetOperatorExcludedMethods' does not satisfy the constraint '"iterator" | "offset" | "then" | "execute" | "catch" | "limit" | "finally" | "_" | "getSQL" | "as" | "union" | "intersect" | "except" | "for" | "where" | "orderBy" | "leftJoin" | ... 14 more ... | "$withCache"'.
Type '"session"' is not assignable to type '"iterator" | "offset" | "then" | "execute" | "catch" | "limit" | "finally" | "_" | "getSQL" | "as" | "union" | "intersect" | "except" | "for" | "where" | "orderBy" | "leftJoin" | ... 14 more ... | "$withCache"'.

138 export type MySqlCreateSetOperatorFn = , TRest extends MySqlSetOperatorWithResult[], TPreparedQueryHKT extends PreparedQueryHKTBase = PreparedQueryHKTBase, TNullabilityMap extends Record = TTableName extends string ? Record : {}, TDynamic extends boolean = false, TExcludedMethods extends string = never, TResult extends any[] = SelectResult[], TSelectedFields extends ColumnsSelection = BuildSubquerySelection>(leftSelect: MySqlSetOperatorInterface, rightSelect: SetOperatorRightSelect, ...restSelects: SetOperatorRestSelect) => MySqlSelectWithout, false, MySqlSetOperatorExcludedMethods, true>;






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/pg-core/query-builders/query.d.ts:23:22 - error TS2420: Class 'PgRelationalQuery' incorrectly implements interface 'SQLWrapper'.
Property 'getSQL' is missing in type 'PgRelationalQuery' but required in type 'SQLWrapper'.

23 export declare class PgRelationalQuery extends QueryPromise implements RunnableQuery, SQLWrapper {
~~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/sql/sql.d.ts:50:5
50 getSQL(): SQL;
~~~~~~~~~~~~~~
'getSQL' is declared here.

node_modules/drizzle-orm/pg-core/roles.d.ts:7:22 - error TS2559: Type 'PgRole' has no properties in common with type 'PgRoleConfig'.

7 export declare class PgRole implements PgRoleConfig {
~~~~~~

node_modules/drizzle-orm/singlestore-core/columns/bigint.d.ts:13:22 - error TS2515: Non-abstract class 'SingleStoreBigInt53Builder' does not implement inherited abstract member generatedAlwaysAs from class 'SingleStoreColumnBuilderWithAutoIncrement'.

13 export declare class SingleStoreBigInt53Builder> extends SingleStoreColumnBuilderWithAutoIncrement' does not implement inherited abstract member generatedAlwaysAs from class 'SingleStoreColumnBuilderWithAutoIncrement'.

35 export declare class SingleStoreBigInt64Builder> extends SingleStoreColumnBuilderWithAutoIncrement' does not implement inherited abstract member generatedAlwaysAs from class 'SingleStoreColumnBuilder'.

14 export declare class SingleStoreBinaryBuilder> extends SingleStoreColumnBuilder {
~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/singlestore-core/columns/boolean.d.ts:14:22 - error TS2515: Non-abstract class 'SingleStoreBooleanBuilder' does not implement inherited abstract member generatedAlwaysAs from class 'SingleStoreColumnBuilder'.

14 export declare class SingleStoreBooleanBuilder> extends SingleStoreColumnBuilder {
~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/singlestore-core/columns/char.d.ts:16:22 - error TS2515: Non-abstract class 'SingleStoreCharBuilder' does not implement inherited abstract member generatedAlwaysAs from class 'SingleStoreColumnBuilder, { length: T["length"]; }, ColumnBuilderExtraConfig>'.

16 export declare class SingleStoreCharBuilder & {
~~~~~~~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/singlestore-core/columns/custom.d.ts:24:22 - error TS2515: Non-abstract class 'SingleStoreCustomColumnBuilder' does not implement inherited abstract member generatedAlwaysAs from class 'SingleStoreColumnBuilder | undefined; customTypeParams: CustomTypeParams; }, { singlestoreColumnBuilderBrand: "SingleStoreCustomColumnBuilderBrand"; }, ColumnBuilderExtraConfig>'.

24 export declare class SingleStoreCustomColumnBuilder> extends SingleStoreColumnBuilder' does not implement inherited abstract member generatedAlwaysAs from class 'SingleStoreColumnBuilder'.

16 export declare class SingleStoreDateBuilder> extends SingleStoreColumnBuilder {
~~~~~~~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/singlestore-core/columns/date.d.ts:37:22 - error TS2515: Non-abstract class 'SingleStoreDateStringBuilder' does not implement inherited abstract member generatedAlwaysAs from class 'SingleStoreColumnBuilder'.

37 export declare class SingleStoreDateStringBuilder> extends SingleStoreColumnBuilder {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/singlestore-core/columns/datetime.d.ts:16:22 - error TS2515: Non-abstract class 'SingleStoreDateTimeBuilder' does not implement inherited abstract member generatedAlwaysAs from class 'SingleStoreColumnBuilder, object, ColumnBuilderExtraConfig>'.

16 export declare class SingleStoreDateTimeBuilder> extends SingleStoreColumnBuilder {
~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/singlestore-core/columns/datetime.d.ts:38:22 - error TS2515: Non-abstract class 'SingleStoreDateTimeStringBuilder' does not implement inherited abstract member generatedAlwaysAs from class 'SingleStoreColumnBuilder, object, ColumnBuilderExtraConfig>'.

38 export declare class SingleStoreDateTimeStringBuilder> extends SingleStoreColumnBuilder {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/singlestore-core/columns/decimal.d.ts:15:22 - error TS2515: Non-abstract class 'SingleStoreDecimalBuilder' does not implement inherited abstract member generatedAlwaysAs from class 'SingleStoreColumnBuilderWithAutoIncrement, ColumnBuilderExtraConfig>'.

15 export declare class SingleStoreDecimalBuilder> extends SingleStoreColumnBuilderWithAutoIncrement {
~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/singlestore-core/columns/decimal.d.ts:36:22 - error TS2515: Non-abstract class 'SingleStoreDecimalNumberBuilder' does not implement inherited abstract member generatedAlwaysAs from class 'SingleStoreColumnBuilderWithAutoIncrement, ColumnBuilderExtraConfig>'.

36 export declare class SingleStoreDecimalNumberBuilder> extends SingleStoreColumnBuilderWithAutoIncrement {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/singlestore-core/columns/decimal.d.ts:58:22 - error TS2515: Non-abstract class 'SingleStoreDecimalBigIntBuilder' does not implement inherited abstract member generatedAlwaysAs from class 'SingleStoreColumnBuilderWithAutoIncrement, ColumnBuilderExtraConfig>'.

58 export declare class SingleStoreDecimalBigIntBuilder> extends SingleStoreColumnBuilderWithAutoIncrement {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/singlestore-core/columns/double.d.ts:14:22 - error TS2515: Non-abstract class 'SingleStoreDoubleBuilder' does not implement inherited abstract member generatedAlwaysAs from class 'SingleStoreColumnBuilderWithAutoIncrement'.

14 export declare class SingleStoreDoubleBuilder> extends SingleStoreColumnBuilderWithAutoIncrement {
~~~~~~~~~~~~~~~~~~~~~~~~
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.