Quantcast
Channel: ReScript Forum - Latest posts
Browsing all 2602 articles
Browse latest View live

RFC: Nested record definitions

Unfortunately I don’t think that functionality from TypeScript translates well to ReScript. The simple cases might (just the equivalent of dot access), but add on things like variants, tuples and more...

View Article


Run single .res file

Hello Gabriel, Can you give more details about what you’re trying to achieve? There’s no built-in command to directly compile and execute rescript code but you can decompose this, run a command that’d...

View Article


Leverage ES decorators

there are ways to do it (PPX), but it’s overall poorly documented and heavily discouraged by the community because it complicates the upgrade of the compiler and creates breaking changes where it...

View Article

Image may be NSFW.
Clik here to view.

RFC: Nested record definitions

I’ve been sidetracked with other things, but I look forward to continuing work on this feature soon! Hoping we can land it in v12, that’d be great. Now that I know we can do it I find myself missing...

View Article

Run single .res file

This would be a really cool feature, at least at a glance. I do think we’d need to do some analysis on how this would work in different cases though - what about if you have dependencies that needs...

View Article


Leverage ES decorators

Attributes in ReScript looks like ES decorators, but they really have nothing to do with each other outside of looking the same. Decorators in ReScript are arbitrary meta information attached to...

View Article

RFC: Nested record definitions

At this point, what benefit is coming out other than just defining the types? type fileConfig = { extension?: string } type persist = { fileName: string, path?: string, fileConfig?: } type options = {...

View Article

Run code in the playground

A run button would be great!

View Article


Image may be NSFW.
Clik here to view.

Leverage ES decorators

tsnobip: What are you trying to solve with custom decorators? sorry, was trying to do stuff like in typescript, but now understand that rescript promotes a different thinking model, ES decorators a...

View Article


React 19 and ReScript

React compiler it’s a babel plugin, so as long Rescript outputs the expected javascript shape, should be fine

View Article

Leverage ES decorators

That’s great feedback. 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?

View Article

Image may be NSFW.
Clik here to view.

Run code in the playground

@YKW @yangdanny97 I added a run button (and a keyboard shortcut) in the playground, don’t hesitate to give some feedback

View Article

React 19 and ReScript

This is not the case today: Will the compiler support plain JSX function calls again? · reactwg/react-compiler · Discussion #22 · GitHub The React compiler doesn’t kick in when the JSX is already...

View Article


Image may be NSFW.
Clik here to view.

React 19 and ReScript

Found a nifty diagram: (Source: [Compiler Bug]: Compiler fails to memoize hooks with no hook calls · Issue #31727 · facebook/react · GitHub) And it is kinda official, since that user is a Meta...

View Article

RFC: Nested record definitions

I think having the option is nice. imo this is easier to read through, as long as the inner types aren’t reused anywhere else. type options = { startFrom: float, persist?: { fileName: string, path?:...

View Article


Run code in the playground

yes. love the keyboard support as well. Thanks

View Article

Image may be NSFW.
Clik here to view.

[ANN] rescript-rest - RPC-like client, contract, and server implementation...

I started building integration for Next.js pages API You can try it out in the rescript-rest@2.0.0-rc.1 version

View Article


Leverage ES decorators

It seems like a pretty tricky problem to explain something that looks similar but is different. Understanding the syntax with a JS background is just as dangerous as understanding the syntax with an...

View Article

RFC: Nested record definitions

The proposal makes perfect sense when I understand records as immutable memory layouts that can no longer be split. TypeScript’s structs have a quite different effect, since they allow declarations to...

View Article

RFC: Nested record definitions

I leave some additional concerns: Polymorphic operations: I’ve argued for deprecating polymorphic operations we have since the introduction of universal operators in v12. For example, we support...

View Article
Browsing all 2602 articles
Browse latest View live