s-libs icon indicating copy to clipboard operation
s-libs copied to clipboard

[ng-core] Feature request: Move `bindToInstance` to `InjectableSuperclass`

Open eric-simonton-sama opened this issue 3 years ago • 1 comments

eric-simonton-sama avatar May 02 '22 14:05 eric-simonton-sama

I attempted this in https://github.com/simontonsoftware/s-libs/commit/5f44ddc4e680271aac348e2e607b015ec38d475e. It led to the error here.

Maybe try again in Angular 14 to see if a new version of typescript can handle the complex class hierarchy (which has a superclass declared in a mixin using <K extends keyof this> which is then overridden in a non-mixin subclass).

ersimont avatar May 05 '22 01:05 ersimont

I tried again in Angular 15. Still gives errors, at least when moving to SubscriptionManager. (Maybe it could move just up to InjectableSuperclass?)

ersimont avatar Jan 16 '23 18:01 ersimont

I'm going to forget this request, at least for now. One of the main purposes of bindToInstance() is to automatically manage change detection, which is only relevant in directives.

ersimont avatar Jun 27 '23 21:06 ersimont