I'm not a big fan of TypeScript but I would somehow like to use this library.
Is there anyway I may use it without TypeScript? I read this blog: http://blog.wolksoftware.com/introducing-inversifyjs And it shows how to make it work with Vanilla JavaScript (and babel ofc). It doesn't seem to be working though (changes I can imagine).
Simple yes/no will be sufficient!
Nvm, found the answer after some digging!
https://github.com/inversify/InversifyJS/blob/master/wiki/basic_js_example.md
If you are planning to use ES6 we have https://github.com/inversify/inversify-vanillajs-helpers 馃槈
@remojansen Ooo interesting! From seeing the examples I don't see ES2016 decorators anywhere, any reason for this?
Example instead of the following:
class MyClass { ... }
inversify.decorate(inversify.injectable(), MyClass);
You'd write
@injectable()
class MyClass { ... }
There are no decorators because babel decorators and typescript decorators are not compatible 馃槶 this will be fixed in a few months when the T39 finish the decorator standard. Also we created the helpers not only for babel users but also for ES5 users.
@remojansen Ah! Glad to hear it will be compatible in the future! :) I guess I'll stick with the vanilla helpers until then, thanks!
Three years later, is it possible to use Inversify without TypeScript in ES6+ JavaScript?
@basickarl @remojansen Do you have any information?
EDIT: Nevermind - it seems I scrolled too fast through the README and only saw the "Usage with TypeScript" section.
Most helpful comment
Nvm, found the answer after some digging!
https://github.com/inversify/InversifyJS/blob/master/wiki/basic_js_example.md