I installed Mousetrap through npm and have been trying to get Mousetrap.bindGlobal to work but this is the error it gives me
Uncaught TypeError: mousetrap__WEBPACK_IMPORTED_MODULE_13__.bindGlobal is not a function
This doesn't make sense because when I import mousetrap in my jsx file, vscode shows that the command is valid. Any help with this would be useful.
bindGlobalis in the TypeScript definition, but not in the NPM package. It's an extension.You can see the documention here. You can either add the extension manually, or add it with NPM/Yarn. I couldn't find any official package, but this one seems to be working fine.
To make it work, you need to add Mousetrap, then the extension.