Typescript build failure

Hello,
using Typescript 5.1.6 and a one-liner index.ts that imports (version 14.12.1) discord.js, I get two compiler errors from the typings of the library:

node_modules/discord.js/typings/index.d.ts:3852:14 - error TS2536: Type 'T' cannot be used to index type 'MappedChannelCategoryTypes'.

3852   ): Promise<MappedChannelCategoryTypes[T]>;
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/discord.js/typings/index.d.ts:3899:14 - error TS2536: Type 'T' cannot be used to index type 'MappedGuildChannelTypes'.

3899   ): Promise<MappedGuildChannelTypes[T]>;
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~


version 14.11.0 had no similar problem.
Is there something I should check about the environment? Is this a known problem?
Was this page helpful?