title: Computed interface values in TypeScript?
body: <p>So basically, I was looking around <a href="https://github.com/discordjs/discord.js/blob/main/packages/discord.js/typings/index.d.ts" rel="nofollow noreferrer">discordjs's typings</a> folder and found this:</p>
  <pre><code>export interface ClientEvents {
    ...
    messageCreate: [message: Message] &lt;- what?
    messageDelete: [message: Message | PartialMessage]
  }
  </code></pre>
  <p>What exactly are they trying to do here? I've heard of index signatures, like in this example here:</p>
  <pre><code>interface Foo {
    [bar: string]: any
  }
  </code></pre>
  <p>But I've never seen any syntax that resembles this in both TS and JS.</p>