I manually converted the flow type definitions to TypeScript for 3.0, which mostly hold up for 4.0
I'll see about getting that into DefinitelyTyped next week, but I'm not fond of the strategy I took, as there are imperfections especially around the different ways that ?, null, undefined, and void are handled within Flow as opposed to TypeScript.
check this https://github.com/facebook/relay/issues/2073#issuecomment-338292538
can't you update the types on https://github.com/DefinitelyTyped/DefinitelyTyped?
to emit typescript for fragments you can use this plugin https://github.com/relay-tools/relay-compiler-language-typescript
@sibelius yep, @alloy is great. My plan is to update his existing types which are currently out of date.
And yes, the relay-compiler-language-typescript plugin is fantastic.
can we close this?
As soon as I update those definitions, yes.
This will continue to be a pain point as Relay code is updated and the TS definitions are always chasing its tail (never in sync). The best solution would really be to have the source code written in TS, but I'm guessing that might be too much to ask.
it won't happen soon I guess
While projects like Jest have made the move, I suspect that Relay is going to be a harder sell to FB. However, if by any chance the team _is_ interested but short on manpower, then I would gladly offer some of my time to help out.
The best solution would really be to have the source code written in TS, but I'm guessing that might be too much to ask.
While projects like Jest have made the move, I suspect that Relay is going to be a harder sell to FB.
A few quick notes on this:
So: we鈥檙e probably not changing languages, if we do it probably won鈥檛 be a different gradually-typed JavaScript (or really any language w GC).
Alright, @ckknight鈥檚 type updates for Relay v4 are merged and an automated release should go out soon, so combined with @josephsavona鈥檚 comment I鈥檓 considering this issue resolved.
Most helpful comment
A few quick notes on this:
So: we鈥檙e probably not changing languages, if we do it probably won鈥檛 be a different gradually-typed JavaScript (or really any language w GC).