Binding classes with property injection to kernel in inversify
问题 I am trying to achieve dependency injection on my node project via inversify. I have a kernel config like this: inversify.config.ts import "reflect-metadata"; import {Kernel, interfaces} from "inversify"; import {Config} from "./config"; import {Collection} from "./collection"; let kernel = new Kernel(); kernel.bind<Config>("Config").to(Config).inSingletonScope(); // kernel.bind<interfaces.Newable<Collection>>("Collection").toConstructor<Collection>(Collection); // it works without the line