title: Extend interface defined in .d.ts file not recognized on compile
body: <p>So I was creating a Discord bot with the Discord.js library and Typescript, but I can't figure out why the class that I extended is working on the eslint, but not in the compiler.</p>
  <p>This is where I create the client object.</p>
  <pre><code>const client = new Discord.Client({
    intents: [
      &quot;GUILDS&quot;,
      &quot;GUILD_MESSAGES&quot;,
      &quot;GUILD_MEMBERS&quot;
    ]
  });
  </code></pre>
  <p>Which has the class Client, that don't have these properties:</p>
  <pre><code>client.commands = new Discord.Collection();
  client.events = new Discord.Collection();
  
  client.loadEvents = (botObject: typeof bot, reload: boolean) =&gt; require(&quot;./handlers/events&quot;)(botObject, reload);
  
  client.loadEvents(bot, false);
  </code></pre>
  <p>So I created a <strong>discord.d.ts</strong> file at the root of the project on <em>/types/common/discord.d.ts</em> extending the class from Discord.js</p>
  <pre><code>import { Collection } from &quot;discord.js&quot;;
  import bot from &quot;../../src/index&quot;;
  
  declare module &quot;discord.js&quot; {
    export interface Client {
      commands: Collection&lt;unknown, any&gt;;
      events: Collection&lt;unknown, any&gt;;
      loadEvents: (botObject: typeof bot, reload: boolean) =&gt; any;
    }
  }
  </code></pre>
  <p>But it only works for the eslint, when I try to compile the bot it gives me the following error:</p>
  <pre><code>TSError: ⨯ Unable to compile TypeScript:
  src/index.ts:39:8 - error TS2339: Property 'commands' does not exist on type 'Client&lt;boolean&gt;'.
  
  39 client.commands = new Discord.Collection();
            ~~~~~~~~
  src/index.ts:40:8 - error TS2339: Property 'events' does not exist on type 'Client&lt;boolean&gt;'.
  
  40 client.events = new Discord.Collection();
            ~~~~~~
  src/index.ts:42:8 - error TS2339: Property 'loadEvents' does not exist on type 'Client&lt;boolean&gt;'.
  
  42 client.loadEvents = (botObject: typeof bot, reload: boolean) =&gt; require(&quot;./handlers/events&quot;)(botObject, reload);
            ~~~~~~~~~~
  src/index.ts:44:8 - error TS2339: Property 'loadEvents' does not exist on type 'Client&lt;boolean&gt;'.
  
  44 client.loadEvents(bot, false);
  </code></pre>
  <p>Can anyone please tell me what I'm missing here.</p>