Right now, when you try to use bot.collectBlock in TypeScript, it doesn't know that the Bot can do that and errors. This adds a mineflayer module declaration, similar to https://github.com/PrismarineJS/mineflayer-pathfinder (here). I also removed the unneeded ts-expect-error since TypeScript now knows that there's a CollectBlock supposed to be there.
Right now, when you try to use
bot.collectBlock
in TypeScript, it doesn't know that theBot
can do that and errors. This adds a mineflayer module declaration, similar to https://github.com/PrismarineJS/mineflayer-pathfinder (here). I also removed the unneeded ts-expect-error since TypeScript now knows that there's aCollectBlock
supposed to be there.