import { Inject , Injectable , Optional } from "./mod.ts" ; @ Injectable ( ) export class Quark { } @ Injectable ( ) export class Electron { } @ Injectable ( ) export class Neutron { constructor ( public quark ) { } } @ Injectable ( ) export class Proton { constructor ( public quark ) { } } @ Injectable ( ) export class Atom { constructor ( public proton ? , public neutron ? , public electron ? ) { } } @ Injectable ( ) export class Molecule { constructor ( public atom ) { } } @ Injectable ( ) export class Person { constructor ( @ Inject ( "PANTS" ) @ Optional ( ) public pants ? ) { } } class Thing { } @ Injectable ( ) export class ThingOne extends Thing { @ Inject ( "THING_TWO" ) otherThing ? : Thing ; } @ Injectable ( "THING_TWO" ) export class ThingTwo extends Thing { @ Inject ( ThingOne ) otherThing ? : Thing ; }