MattTheWaz
MattTheWaz
DIAdiscord.js - Imagine an app
Created by MattTheWaz on 10/20/2024 in #djs-questions
Typescript Error 'typeof Client' incorrectly extends base class
Node v20.16.0
djs v14.16.3
TS v5.6.3
Node v20.16.0
djs v14.16.3
TS v5.6.3
Hi! Recently updated some packages and started running into this ts build error:
node_modules/discord.js/typings/index.d.ts:986:14 - error TS2417: Class static side 'typeof Client' incorrectly extends base class static side 'typeof BaseClient'.
The types returned by 'on(...)' are incompatible between these types.
Property '[Symbol.asyncDispose]' is missing in type 'AsyncIterableIterator<any>' but required in type 'AsyncIterator<any[], any, any>'.

986 export class Client<Ready extends boolean = boolean> extends BaseClient {
~~~~~~

node_modules/typescript/lib/lib.esnext.disposable.d.ts:40:5
40 [Symbol.asyncDispose](): PromiseLike<void>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'[Symbol.asyncDispose]' is declared here.
node_modules/discord.js/typings/index.d.ts:986:14 - error TS2417: Class static side 'typeof Client' incorrectly extends base class static side 'typeof BaseClient'.
The types returned by 'on(...)' are incompatible between these types.
Property '[Symbol.asyncDispose]' is missing in type 'AsyncIterableIterator<any>' but required in type 'AsyncIterator<any[], any, any>'.

986 export class Client<Ready extends boolean = boolean> extends BaseClient {
~~~~~~

node_modules/typescript/lib/lib.esnext.disposable.d.ts:40:5
40 [Symbol.asyncDispose](): PromiseLike<void>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'[Symbol.asyncDispose]' is declared here.
Packages list: ├── @types/[email protected] ├── @types/[email protected] ├── @types/[email protected] ├── @types/[email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] └── [email protected]
21 replies