Object that stores injectables
@Config
defines values that will be available for injection
@Config
encapsulates @Property
annotations. @Property
takes a string as an argument and injects the returned value of the method using that string
Properties may also use other properties in the config as long as they are declared in order
import { Config } from "@fork-git-it/annotatedjs";
@Config()
export class ExampleConfig {
@Property("Injected")
getInjected(): unknown {
// return some value to be injected
}
@Property("AnotherInjected")
getAnotherInjected(): unknown {
this.getInjected(); // will return singleton
// return value to be injected
}
}
Generated using TypeDoc
A class decorator that encapsulates injectable properties