chancancode / ember-polaris-service

Previewing Ember Polaris style services
Other
13 stars 3 forks source link

"default manager" #11

Open chancancode opened 8 months ago

chancancode commented 8 months ago

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