Amoxi: Dependency injection that fails the build, not production
Amoxi resolves service wiring at build time using the TypeScript compiler rather than runtime reflection, so configuration mistakes surface during compilation. In the article's greeting API example, a service depends on a Greeter interface and reads a configuration value that defaults to an exclamation mark. Amoxi generates plain constructor calls with dependencies already resolved, which is why applications start in tens of milliseconds. When a second Greeter implementation is added, the build fails with a clear file-and-line error about ambiguous beans, prompting the developer to name or prioritize one. The approach is presented as similar to what Micronaut and Dagger do for Java.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in