I'm looking into using ast-grep fo linting ReScript. What rules should I...
I have it running on Node 20, but I’m struggling with Node 22. This works on node 20: sg scan --config "./node_modules/rescript-lint/sgconfig.yml" src warning[no-console]: Unexpected console...
View ArticleRescript frustration
The language is good at some things and bad at others. As is the case with any language. Can you share some code examples that frustrate you? if it’s really annoying, I write it in js and import it...
View ArticleRescript frustration
I feel like you bro. But every new version there is less and less things like that
View ArticleRescript frustration
thanks. i agree we’re making progress, but i think the team is too conservative with regard to adding new features. if-let was decided as not needed because you don’t really gain anything over switch....
View ArticleRescript frustration
i actually did give examples, but ok: with while-let: while let Some(data) = dataReader.read() { // ... } vs let done = ref(false) // also is a useless alloc unless rescript is optimizing that away,...
View ArticleRescript frustration
Not really. Currently the main focus is to clean things up in v12 release. I believe we can do much more after getting rid of bs legacy.
View ArticleCreating Optional Fields out of strict record
How can I convert a record with strict fields to optional fields? For example, if i have a record like type t = { name : string, age : int} i want some wrapper type like type optional_t =...
View ArticleWhy do I get "module or file RescriptCore can't be found" error on VSCode?
I’m new to Rescript, so I apologize if this is obvious. This shows up at the beginning of almost every file. I have done both things the error message suggests (except I’m using rescript.json). The...
View ArticleCreating Optional Fields out of strict record
I don’t know, if there is a native way. Tried it several times. But there is a ppx. Have a look: GitHub - green-labs/ppx_ts: ReScript PPX helps the binding to typescript modules
View ArticleCreating Optional Fields out of strict record
If you want something like typescript Partial<T> utility type, then you’ll be disappointed by lack of support on Rescript
View ArticleI'm looking into using ast-grep fo linting ReScript. What rules should I...
Of note: as far as I can tell, there’s not a way to track individual variables with ast-grep, so I don’t think we’d be able to use it for, say, checking dependency arrays. I might play around with...
View ArticleLeverage ES decorators
zth: What could we do to improve that? A section in the docs, or more content in the docs addressing people coming from JS/TS specifically? I think it’s a pretty good idea, to have a section called...
View ArticleRescript frustration
I have been in a loop between rescript and scala.js being simple like rescript it’s nice until more power it’s required being complete like scala.js it’s good until it gets overwhelming However think...
View ArticleCreating Optional Fields out of strict record
@saulpalv exactly I want something like Partial not possible ? and are there any good resources/tips for learning about the type-level stuff in rescript?
View ArticleCreating Optional Fields out of strict record
There’s no such thing as partial or type modifiers in rescript, the type system is relatively simple in rescript, which is usually a good thing!
View ArticleWhy do I get "module or file RescriptCore can't be found" error on VSCode?
Did you try restarting the vscode extension?
View ArticleWhy do I get "module or file RescriptCore can't be found" error on VSCode?
FYI we’ll be looking into this, there has been similar reports recently.
View ArticleCreating Optional Fields out of strict record
a bit verbose but I have used a pattern of making a structure type and then instantiating: type structure<'a, 'b> = { name: 'a, age: 'b} type t = structure<string, int> type opt =...
View Article