re-rxjs / react-rxjs

React bindings for RxJS
https://react-rxjs.org
MIT License
546 stars 18 forks source link

Typescript integration issues #233

Closed cabello closed 1 year ago

cabello commented 2 years ago

Hi @josepot , how you doing? I hope you are doing great 😄

This is somewhat related to #228.

While doing minor release updates:

Screen Shot 2021-11-15 at 7 50 26 PM

My Typescript app broke:

Screen Shot 2021-11-15 at 7 50 54 PM

Apparently Typescript does not support mjs yet so webpack customization is required in this case: https://github.com/formatjs/formatjs/issues/1395

Was that intentional? I.e. the fact that the library now breaks with Typescript?

Ideas, suggestions on how to bypass that? I think writing a custom rule saying mjs is still js is the most promising solution: https://github.com/formatjs/formatjs/issues/1395#issuecomment-518823361

Have a good one,

josepot commented 2 years ago

Hi @cabello !

Thanks for reporting this! I think that we addressed this issue already, but it looks like we forgot to publish the patch for @react-rxjs/utils@0.8.X. Could you please try using @react-rxjs/utils@0.9.3 (there shouldn't be any breaking changes...) and let us know if that solves the "compiling" issue? If it does, then I will publish a @react-rxjs/utils@0.8.4 patch for this issue.

Thanks again!

voliva commented 1 year ago

As far as I know this issue has been fixed in the most recent versions of react-rxjs.

The exports definition on package.json was addressed in https://github.com/re-rxjs/react-rxjs/pull/302