Nozbe / withObservables

HOC (Higher-Order Component) for connecting RxJS Observables to React Components
https://github.com/Nozbe/WatermelonDB
MIT License
68 stars 26 forks source link

Improve types (Hoist Statics and Props Inference) #98

Closed azizhk closed 4 years ago

azizhk commented 4 years ago

Carry on work from https://github.com/Nozbe/withObservables/pull/90 CC: @radex

radex commented 4 years ago

@azizhk hey, there's a TS problem:

$ tsc --noEmit
[1] yarn eslint exited with code 0
[3] typescript.test.tsx(40,26): error TS2339: Property 'id' does not exist on type 'Observable<Model>'.
[3] typescript.test.tsx(41,24): error TS2339: Property 'id' does not exist on type 'Observable<Model>'.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[3] yarn test:typescript exited with code 1
--> Sending SIGTERM to other processes..
[0] yarn test exited with code 1
--> Sending SIGTERM to other processes..
[2] yarn flow exited with code 1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
azizhk commented 4 years ago

@radex fixed it.

radex commented 4 years ago

thanks!