ngneat / until-destroy

🦊 RxJS operator that unsubscribe from observables on destroy
https://netbasal.com/
MIT License
1.74k stars 100 forks source link

Support TS 5.0 non experimental decorators for the UntilDestroy decorator #229

Closed yharaskrik closed 1 year ago

yharaskrik commented 1 year ago

As of Angular 16, TS will be on version 5 which no longer needs the experimental decorators. Angular decorators are already compatible and support having that TS flag on or off.

 [ERROR] TS1238: Unable to resolve signature of class decorator when called as an expression.
  The runtime will invoke the decorator with 2 arguments, but the decorator expects 1. [plugin angular-compiler]

    libs/shared/ui/address/src/lib/form/address-form.component.ts:24:1:
      24 │ @UntilDestroy()
         ╵  ~~~~~~~~~~~~~~

As it stands the until-destroy package is not yet compatible with experimentalDecorators off but if the decorators in Angular such as Injectable can work with both then I would think this one could too.