Typescript build fails, pointing to internal types.

My typescript build fails with 4 errors, all of them pointing to internal type declarations. Is there anything I can do to prevent this? My tsconfig:
{
"compilerOptions": {
"module": "ESNext",
"esModuleInterop": true,
"target": "ESNext",
"moduleResolution": "Node",
"sourceMap": true,
"outDir": "out",
"rootDir": "src",
"newLine": "crlf"
},
"lib": ["es2015"],
"include": ["src"],
"exclude": ["node_modules", "./node_modules", "./node_modules/*"]
}
{
"compilerOptions": {
"module": "ESNext",
"esModuleInterop": true,
"target": "ESNext",
"moduleResolution": "Node",
"sourceMap": true,
"outDir": "out",
"rootDir": "src",
"newLine": "crlf"
},
"lib": ["es2015"],
"include": ["src"],
"exclude": ["node_modules", "./node_modules", "./node_modules/*"]
}
1 Reply
Jona Anders
Jona AndersOP17mo ago
The error (split in half because of message length limit)
node_modules/drizzle-orm/mysql-core/index.d.ts:735:43 - error TS2344: Type 'Omit<T, "hasDefault"> & { hasDefault: true; } extends infer T_1 ? { [K in keyof T_1]: (Omit<T, "hasDefault"> & { hasDefault: true; })[K]; } : never' does not satisfy the constraint 'ColumnBuilderBaseConfig'.
Type '{}' is missing the following properties from type 'ColumnBuilderBaseConfig': name, data, driverParam, notNull, hasDefault

735 defaultNow(): ColumnBuilderKind<THKT, Omit<T, "hasDefault"> & {
~~~~~~~~~~~~~~~~~~~~~~~~~
736 hasDefault: true;
~~~~~~~~~~~~~~~~~~~~~~~~~
...
738 hasDefault: true;
~~~~~~~~~~~~~~~~~~~~~~~~~
739 })[K]; } : never>;
~~~~~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/mysql-core/index.d.ts:737:47 - error TS2536: Type 'K' cannot be used to index type 'Omit<T, "hasDefault"> & { hasDefault: true; }'.

737 } extends infer T_1 ? { [K in keyof T_1]: (Omit<T, "hasDefault"> & {
~~~~~~~~~~~~~~~~~~~~~~~~~~
738 hasDefault: true;
~~~~~~~~~~~~~~~~~~~~~~~~~
739 })[K]; } : never>;
~~~~~~~~~

node_modules/drizzle-orm/select.types.d-b947a018.d.ts:491:15 - error TS2420: Class 'MySqlDelete<TTable, TQueryResult, TPreparedQueryHKT>' incorrectly implements interface 'SQLWrapper'.
Property 'getSQL' is missing in type 'MySqlDelete<TTable, TQueryResult, TPreparedQueryHKT>' but required in type 'SQLWrapper'.

491 declare class MySqlDelete<TTable extends AnyMySqlTable, TQueryResult extends QueryResultHKT, TPreparedQueryHKT extends PreparedQueryHKTBase> extends QueryPromise<QueryResultKind<TQueryResult, never>> implements SQLWrapper {
~~~~~~~~~~~

node_modules/drizzle-orm/column.d-aa4e525d.d.ts:275:5
275 getSQL(): SQL;
~~~~~~~~~~~~~~
'getSQL' is declared here.
node_modules/drizzle-orm/mysql-core/index.d.ts:735:43 - error TS2344: Type 'Omit<T, "hasDefault"> & { hasDefault: true; } extends infer T_1 ? { [K in keyof T_1]: (Omit<T, "hasDefault"> & { hasDefault: true; })[K]; } : never' does not satisfy the constraint 'ColumnBuilderBaseConfig'.
Type '{}' is missing the following properties from type 'ColumnBuilderBaseConfig': name, data, driverParam, notNull, hasDefault

735 defaultNow(): ColumnBuilderKind<THKT, Omit<T, "hasDefault"> & {
~~~~~~~~~~~~~~~~~~~~~~~~~
736 hasDefault: true;
~~~~~~~~~~~~~~~~~~~~~~~~~
...
738 hasDefault: true;
~~~~~~~~~~~~~~~~~~~~~~~~~
739 })[K]; } : never>;
~~~~~~~~~~~~~~~~~~~~

node_modules/drizzle-orm/mysql-core/index.d.ts:737:47 - error TS2536: Type 'K' cannot be used to index type 'Omit<T, "hasDefault"> & { hasDefault: true; }'.

737 } extends infer T_1 ? { [K in keyof T_1]: (Omit<T, "hasDefault"> & {
~~~~~~~~~~~~~~~~~~~~~~~~~~
738 hasDefault: true;
~~~~~~~~~~~~~~~~~~~~~~~~~
739 })[K]; } : never>;
~~~~~~~~~

node_modules/drizzle-orm/select.types.d-b947a018.d.ts:491:15 - error TS2420: Class 'MySqlDelete<TTable, TQueryResult, TPreparedQueryHKT>' incorrectly implements interface 'SQLWrapper'.
Property 'getSQL' is missing in type 'MySqlDelete<TTable, TQueryResult, TPreparedQueryHKT>' but required in type 'SQLWrapper'.

491 declare class MySqlDelete<TTable extends AnyMySqlTable, TQueryResult extends QueryResultHKT, TPreparedQueryHKT extends PreparedQueryHKTBase> extends QueryPromise<QueryResultKind<TQueryResult, never>> implements SQLWrapper {
~~~~~~~~~~~

node_modules/drizzle-orm/column.d-aa4e525d.d.ts:275:5
275 getSQL(): SQL;
~~~~~~~~~~~~~~
'getSQL' is declared here.
node_modules/drizzle-orm/select.types.d-b947a018.d.ts:572:15 - error TS18052: Non-abstract class 'MySqlSelect<TTableName, TSelection, TSelectMode, TPreparedQueryHKT, TNullabilityMap>' does not implement all abstract members of 'MySqlSelectQueryBuilder<MySqlSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap>'

572 declare class MySqlSelect<TTableName extends string | undefined, TSelection, TSelectMode extends SelectMode, TPreparedQueryHKT extends PreparedQueryHKTBase, TNullabilityMap extends Record<string, JoinNullability> = TTableName extends string ? Record<TTableName, 'not-null'> : {}> extends MySqlSelectQueryBuilder<MySqlSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap> {
~~~~~~~~~~~

node_modules/drizzle-orm/select.types.d-eff54486.d.ts:9:14
9 abstract getSQL(): SQL;
~~~~~~
Non-abstract class 'MySqlSelect<TTableName, TSelection, TSelectMode, TPreparedQueryHKT, TNullabilityMap>' does not implement inherited abstract member 'getSQL' from class 'MySqlSelectQueryBuilder<MySqlSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap>'.


Found 4 errors in 2 files.

Errors Files
2 node_modules/drizzle-orm/mysql-core/index.d.ts:735
2 node_modules/drizzle-orm/select.types.d-b947a018.d.ts:491
node_modules/drizzle-orm/select.types.d-b947a018.d.ts:572:15 - error TS18052: Non-abstract class 'MySqlSelect<TTableName, TSelection, TSelectMode, TPreparedQueryHKT, TNullabilityMap>' does not implement all abstract members of 'MySqlSelectQueryBuilder<MySqlSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap>'

572 declare class MySqlSelect<TTableName extends string | undefined, TSelection, TSelectMode extends SelectMode, TPreparedQueryHKT extends PreparedQueryHKTBase, TNullabilityMap extends Record<string, JoinNullability> = TTableName extends string ? Record<TTableName, 'not-null'> : {}> extends MySqlSelectQueryBuilder<MySqlSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap> {
~~~~~~~~~~~

node_modules/drizzle-orm/select.types.d-eff54486.d.ts:9:14
9 abstract getSQL(): SQL;
~~~~~~
Non-abstract class 'MySqlSelect<TTableName, TSelection, TSelectMode, TPreparedQueryHKT, TNullabilityMap>' does not implement inherited abstract member 'getSQL' from class 'MySqlSelectQueryBuilder<MySqlSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap>'.


Found 4 errors in 2 files.

Errors Files
2 node_modules/drizzle-orm/mysql-core/index.d.ts:735
2 node_modules/drizzle-orm/select.types.d-b947a018.d.ts:491
Want results from more Discord servers?
Add your server