You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Look at TestModule.gen.tsx. Notice that the function result from the mathOperation is type a for the React component, which is a type error. There is no such problem with the makeRegular.
This is a simplified version of a real problem I'm having in my code. My React component is generic and a few of the props all rely on the same type param. I'm just a hobby programmer and run into problems with gentype. Does anyone actually use gentype in the real world? I'm really hoping the improvement in V12 happens with .d.ts file output.
I tried this kind of .resi and the .gen.tsx does the right thing. BUT I can't figure out how to actually use it without a functor. So it is generic, but is a hassle to use.
Defining the react component like this seems to work. But it isn't as ergonomic to use as the let make=(~initial,~mathOperation,... I was told of some kind of @react.component(: weirdProps) syntax but couldn't get it to work here.
See https://github.com/jmagaram/gentype-issue.
Look at
TestModule.gen.tsx
. Notice that the function result from themathOperation
is typea
for the React component, which is a type error. There is no such problem with themakeRegular
.This is a simplified version of a real problem I'm having in my code. My React component is generic and a few of the props all rely on the same type param. I'm just a hobby programmer and run into problems with gentype. Does anyone actually use gentype in the real world? I'm really hoping the improvement in V12 happens with
.d.ts
file output.I tried this kind of .resi and the .gen.tsx does the right thing. BUT I can't figure out how to actually use it without a functor. So it is generic, but is a hassle to use.
The text was updated successfully, but these errors were encountered: