Should services have a "default manager" like helper do? I am leaning no.
Some considerations: we can't reliably tell between a constructor and a function without calling them at runtime, so we kind of just have to pick one between (scope: Scope) => T or class PlainClassWithNoSuperClass { constructor(scope: Scope) {} } being the default. Neither seems like a great option (at the expense of the other), and IMO between factory(), and the Service base class things are plenty ergonomic as it is
Should services have a "default manager" like helper do? I am leaning no.
Some considerations: we can't reliably tell between a constructor and a function without calling them at runtime, so we kind of just have to pick one between
(scope: Scope) => T
orclass PlainClassWithNoSuperClass { constructor(scope: Scope) {} }
being the default. Neither seems like a great option (at the expense of the other), and IMO betweenfactory()
, and theService
base class things are plenty ergonomic as it is