Rescript Relay connecting mutation with refechable pagination
I think the reason is because I was blindly following the tutorial without prior Relay knowledge I wrapped __id with AlbumRelayComposerFragment and placed it in the wrong place. The order of things in...
View ArticleRescript Relay connecting mutation with refechable pagination
The whole thing was definitely more of a relay issue than a rescript issue, but glad I could help
View ArticleWhy does the "pipe" operator have a higher precedence?
gaspard: let foo = 3 + 4 -> Int.toString My guess is because essentially you are doing this: let foo = 3 + Int.toString(4) Which will not compile because the types don’t match.
View ArticleWhy does the "pipe" operator have a higher precedence?
I think the precedence is similar to JS: 3 + toString(4) // or 3 + (4).toString() Mind that pipes are syntactic sugar for function calls (example one) and are used to model method calls (example two)....
View ArticleHow can i make sure dotenv is loaded
Consider dotenvx - also from the creator of dotenv. so if the start command in package.json was previously: "start": "node src/Server.bs.js", it would now be: "start": "dotenvx run -- node...
View ArticleAlright, what does the tilde do
Chatbots can be useful - here’s an example using the rescript custom gpt. Even if it hallucinates you can use it to direct you to official docs.
View ArticleReScript Extension for Nova
This editor has also caught my attention, wonder how much work it’d be to get basic syntax highlighting and a format on save going, @Ponylawl did you get anywhere when looking at the extension?
View ArticleCast unbox to primitive
Like this: /// https://firebase.google.com/docs/reference/js/firestore_.querydocumentsnapshot.md#querydocumentsnapshot_class type query<'kind, 'documentdata, 'metadata> type...
View ArticleRescript: How to model package.json / collection of two strings
I recommend you to split parsing phases at least two. package.json is a mix of various concerns in the ecosystem and has no canonical schema. Some tools (e.g. Node.js) adds there very complex specs...
View Article[ANN] rescript-rest - RPC-like client, contract, and server implementation...
rescript-rest@0.4.1 released! It comes with type-safe responses support. There’s still a big list of possible features, but from this moment, I’d call rescript-rest ready to be used in real projects...
View Article[ANN] rescript-rest - RPC-like client, contract, and server implementation...
Also, there’s a cool feature to define response headers, which doesn’t exist in ts-rest Responses from an API can include custom headers to provide additional information on the result of an API call....
View ArticleBegginer: Extension methods?
Given that Rescript type system is nominal, adding support for extension methods can be use useful, specially if extension methods names can be math like ‘operators’ like (+ , +=, etc) It’s worth...
View ArticleBegginer: Extension methods?
Actually realized there is an idiomatic equivalent myVar -> extension
View ArticleI’m looking for advice on best practices for using ReScript in a large-scale...
My website is an e-commerce platform with complex business logic and a large codebase. Problem: I’m considering integrating ReScript to improve type safety and maintainability, but I’m unsure of the...
View ArticleI’m looking for advice on best practices for using ReScript in a large-scale...
I don’t know if there’s any documentation about this, I think a lot of people prefer to start converting their business logic (the core of the architecture), and keep the outer layers in the language...
View ArticleI’m looking for advice on best practices for using ReScript in a large-scale...
pragprog.com Domain Modeling Made Functional Use domain-driven design to effectively model your business domain, and implement that model with F#. for me, THE reason to use a typed language is so I...
View ArticleWhat can be expected regarding the upcoming React 19 Compiler
I was curious to see how the latest version of Rescript works with the new React compiler, so I’ve managed to setup a minimal project with Next (raw js, typescript added some build complexities). So...
View ArticleShorter variant TAG output?
According to js output for variants type family = Child | Mom(int, string) | Dad (int) let f1 = Child let f2 = Mom(30, "Jane") let f3 = Dad(32) compiles to var f1 = "Child"; var f2 = { TAG: "Mom", _0:...
View ArticleShorter variant TAG output?
The good news is you can customize it with the @tag("_") annotation
View Article