Welcome to the ReScript Forum
Hello everyone! I am new to rescript, what resources or books should i use to learn the language?
View ArticleRecord in list decomposed in a single step needs type hint, is this a bug?
I made a hack to convert let { record-pattern} = expr ==> switch expr { {record-pattern} => } So that more type info could be used to resolve the names, the fix could be relax the rule to...
View ArticleRecord in list decomposed in a single step needs type hint, is this a bug?
Out of curiosity, how does this explain the difference of the record type resolution in and out of the closure? // breaks let {a, b} = Definition.getRecord() let doIt = () => { // compiles let {a,...
View ArticleWelcome to the ReScript Forum
Welcome to ReScript! The most up to date resource are the ReScript docs: https://rescript-lang.org/ There is a somewhat recent book: Introducing ReScript: Functional Programming for Web Applications |...
View ArticleRecord in list decomposed in a single step needs type hint, is this a bug?
Toplevel is not an expression. Another easier fix is to change the order of typing rules, that’s what I did in MoonBit.
View ArticleWhat keep you guys using Rescript?
For me it’s all about the quality of the type system (and ML languages do very well here): Type soundness (there seems little point to a type system without it). Hindley-Milner type inference ADT’s, /...
View Article[RFC] Generic JSX transform
Hey, I have a custom function which should create a jsx element type options<'props> = { name: string, render: 'props => Jsx.element, } let makeWithProps = options => { ... } module...
View ArticleA better way to call an async function inside an event handler
in ReScript is there a better way to call an async function inside an event handler than using ->ignore? Need to call this async function inside an onClick but get compiler error unless I call it...
View ArticleA better way to call an async function inside an event handler
a safer way to ignore a promise if you use RescriptCore is to call Promise.done.
View ArticleA better way to call an async function inside an event handler
I have this utility function in my project: // Turn async function into a fire-and-forget function let prime: ('a => promise<unit>) => 'a => unit = f => x => f(x)->ignore With...
View ArticleA better way to call an async function inside an event handler
In uncurried mode, doing this should be safe as well: let _ = handleDuplicateQuote()
View ArticleA better way to call an async function inside an event handler
i’ve used this but ->ignore feels less hacky to me
View ArticleState of rescript lib Docs
Hello everyone, I’m keen to know, how the rescript library authors of you approach documentation for such a lib? Do you just write a (simple?) readme? Do you have api docs? (How? Where?) Do you use...
View Article@deprecated only works on external?
Do I have that right? Would really love to have this everywhere. Making heroic changes is fun but its better in teams to give those breaking changes a little time to migrate.
View Article@deprecated only works on external?
It should work on more than externals. Do you have a reproduction?
View Article@deprecated only works on external?
Let me see, I just saw it in vscode with local work…
View Article@deprecated only works on external?
@deprecated on %raw implementations: ReScript Documentation ReScript Playground Try ReScript in the browser
View Article@deprecated only works on external?
@deprecated on decorator of external function: ReScript Documentation ReScript Playground Try ReScript in the browser
View Article