Replies: 1 comment 1 reply
-
This commit, 20c185d, turns Bot from a class to an interface. Since interfaces are extendable in Typescript, you should be able to add your functions to the bot and extend it without problem in a d.ts file. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to load my own plugins onto
bot
without TypeScript complaining.I tried a lot, even mangling with
prototype
, but TypeScript always says it doesn't find the appropriate member.Currently I'm using brackets but those don't have auto complete/navigation in the IDE (phpStorm with Node support)
But I want to use
without TypeScript complaining about
bot.myPlugin
being unknown and without putting// @ts-ignore
in the code.Any suggestions? I'm using mineflayer through npm package.json dependency.
Beta Was this translation helpful? Give feedback.
All reactions