Is it possible to inject classes that you can't edit? It seems Inversify is heavily dependent on annotations/decorators but is there another way?
From the inversify wiki:
In some cases you may get errors about missing annotations classes provided by a third party modul like:
Error: Missing required @injectable annotation in: SamuraiMaster
You can overcome this problem using the decorate function:
import { decorate, injectable } from "inversify"; import SomeClass from "some-module"; decorate(injectable(), SomeClass); return SomeClass;
Check out the JS example page on the wiki for more info.
You can also check out the inversify-vanillajs-helpers project.