mini-rx-store icon indicating copy to clipboard operation
mini-rx-store copied to clipboard

Type parameter 'OT' has a circular constraint. createEffect typing broken in TS 5.4

Open spierala opened this issue 1 year ago • 6 comments

image

Angular 17.3 TS 5.4.5

The same issue appears in NgRx/Effects: https://github.com/ngrx/platform/issues/4275 createEffect in MiniRx is heavily inspired by NgRx...

We can apply the same fix as the NgRx team.

In the meanwhile it is possible to downgrade to TS 5.3.3 and the issue is gone.

This libs have to be fixed:

  • mini-rx-store
  • @mini-rx/common

There is a refactor of mini-rx-store ongoing (https://github.com/spierala/mini-rx-store/issues/209) to use also @mini-rx/common. The refactor of mini-rx-store will be released as a new major version (v6). I suggest to release the TypeScript fix also as part of v6. In that case the fix has to be applied only in @mini-rx/common.

spierala avatar Apr 17 '24 12:04 spierala

The latest version of Angular require greater than 5.3 : The Angular Compiler requires TypeScript >=5.4.0 and <5.5.0 but 5.3.3 was found instead.

I hope it will not be too long to have a new release with the fix. Thanks in advance!

marcpearson avatar Jul 12 '24 20:07 marcpearson

@marcpearson do you need the fix in mini-rx-store or signal-store?

I am thinking to release a fix before the @mini-rx/common refactor (which still needs some time).

spierala avatar Jul 15 '24 06:07 spierala

Signal-store. All my projects will be migrate to signal-store anyway

marcpearson avatar Jul 15 '24 18:07 marcpearson

@marcpearson I am thinking to publish signal store v3 alpha with just the TS fix

for Angular 17+

spierala avatar Jul 16 '24 13:07 spierala

Hey @marcpearson ,

We just released @mini-rx/signal-store 3.0.0-alpha.1 with the TypeScript fix.

please let us know if the issue is solved for you.

Here it seems to work.

spierala avatar Jul 18 '24 20:07 spierala

With the 3.0.0-alpha.1 version, everything seems good for me too. Merci beaucoup !

marcpearson avatar Jul 19 '24 18:07 marcpearson

Fixed in mini-rx-store@6 and @mini-rx/signal-store@3

spierala avatar Jan 28 '25 11:01 spierala