Typing issues with discord.js

Having issues with the typings of discord.js on my TS project.

node_modules/discord.js/typings/index.d.ts:1231:3 - error TS1128: Declaration or statement expected.

1231   public getFocused(getFull: true): AutocompleteFocusedOption;
       ~~~~~~

node_modules/discord.js/typings/index.d.ts:1231:28 - error TS1005: ',' expected.

1231   public getFocused(getFull: true): AutocompleteFocusedOption;
                                ~

node_modules/discord.js/typings/index.d.ts:1231:35 - error TS1005: ';' expected.

1231   public getFocused(getFull: true): AutocompleteFocusedOption;
                                       ~

node_modules/discord.js/typings/index.d.ts:1232:3 - error TS1128: Declaration or statement expected.

1232   public getFocused(getFull?: boolean): string;
       ~~~~~~

node_modules/discord.js/typings/index.d.ts:1232:29 - error TS1109: Expression expected.

1232   public getFocused(getFull?: boolean): string;
                                 ~

node_modules/discord.js/typings/index.d.ts:1232:39 - error TS1005: ';' expected.

1232   public getFocused(getFull?: boolean): string;
                                           ~

node_modules/discord.js/typings/index.d.ts:1233:1 - error TS1128: Declaration or statement expected.

1233 }
     ~


Found 107 errors in the same file, starting at: node_modules/discord.js/typings/index.d.ts:1175


There are way more errors not including full

Here is my tsconfig.json:
{
  "include": [
    "./**/*.ts",
    "./**/*.js",
    "./.eslintrc.cjs",
  ],
  "compilerOptions": {
    "strict": false,
    "moduleResolution": "node",
    "module": "CommonJS",
    "target": "ESNext",
    "skipLibCheck": true,
    "isolatedModules": true,
    "sourceMap": true,
    "forceConsistentCasingInFileNames": true,
    "lib": ["es2021", "ESNext"],
    "outDir": "./dist",
    "esModuleInterop": true,
    "incremental": true,
    "noEmitHelpers": true,
    "importHelpers": true,
    "types": ["node"],
    "allowJs": true,
    "declaration": true,
    "noImplicitAny": true,
  }
}


I've used Discord.JS in the past and have never got this error, also searched for this errors in the forum and on slack and github but haven't found it.
Was this page helpful?