spierala / mini-rx-store

MiniRx - The reactive state management platform
https://mini-rx.io
Other
169 stars 9 forks source link

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

Open spierala opened 4 months ago

spierala commented 4 months ago

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:

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.

marcpearson commented 2 months ago

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!

spierala commented 1 month ago

@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).

marcpearson commented 1 month ago

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

spierala commented 1 month ago

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

for Angular 17+

spierala commented 1 month ago

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.

marcpearson commented 1 month ago

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