discordjs / discord.js

A powerful JavaScript library for interacting with the Discord API
https://discord.js.org
Apache License 2.0
25.5k stars 3.97k forks source link

node_modules/discord.js/typings/index.d.ts(267,40): error TS2689: Cannot extend an interface 'Map'. Did you mean 'implements'? #2341

Closed mlagarrigue closed 6 years ago

mlagarrigue commented 6 years ago

it happens when compiling my ts project

you should just change export class Collection<K, V> extends Map<K, V> { into export class Collection<K, V> implements Map<K, V> { here is my tsconfig

{
    "compilerOptions": {
      /* Basic Options */
      "target": "ES5",                          /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
      "module": "es2015",                         /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
      "sourceMap": true,                        /* Generates corresponding '.map' file. */
       "outDir": "./.build/",                    /* Redirect output structure to the directory. */

      /* Strict Type-Checking Options */
      "strict": true,                           /* Enable all strict type-checking options. */
       "noImplicitAny": true,                   /* Raise error on expressions and declarations with an implied 'any' type. */
       "strictNullChecks": true,                /* Enable strict null checks. */
       "strictFunctionTypes": true,             /* Enable strict checking of function types. */
       "noImplicitThis": true,                  /* Raise error on 'this' expressions with an implied 'any' type. */
       "alwaysStrict": true,                    /* Parse in strict mode and emit "use strict" for each source file. */

      /* Additional Checks */
       "noUnusedLocals": true,                  /* Report errors on unused locals. */
       "noUnusedParameters": true,              /* Report errors on unused parameters. */
       "noImplicitReturns": true,               /* Report error when not all code paths in function return a value. */
       "noFallthroughCasesInSwitch": true,       /* Report errors for fallthrough cases in switch statement. */

      /* Module Resolution Options */
       "moduleResolution": "node",            /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
    }
  }
DevYukine commented 6 years ago

i think this belongs to The Official typings repo of Discord.js rather than to d.js repo itself

mlagarrigue commented 6 years ago

I created an issue on there github too,

do you confirm I can close here ?

DevYukine commented 6 years ago

yes you can close this now :)