simontonsoftware / s-libs

A collection of libraries for any of javascript, rxjs, or angular.
MIT License
43 stars 5 forks source link

[rxjs-core] Feature request: Move `bindToInstance` to `SubscriptionManager` #75

Closed eric-simonton-sama closed 1 year ago

ersimont commented 2 years ago

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 commented 1 year ago

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

ersimont commented 1 year ago

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.