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

Issue getting generic JSX transform to work with lite-jsx

Well, since that wouldn’t work easily, this JS might be a starting point for wrapping h? const wrappedH = (tag, props) => { const {children, ...restProps} = props ?? {}; const childArray =...

View Article


Issue getting generic JSX transform to work with lite-jsx

Yup, that worked! I knew it had to be something like that.

View Article


Issue getting generic JSX transform to work with lite-jsx

Almost done and ready to push up to NPM.

View Article

Image may be NSFW.
Clik here to view.

Issue getting generic JSX transform to work with lite-jsx

Done! npm @jvlk/rescript-lite-jsx ReScript support for lite-jsx, a lightweight library to generate HTML. A good match for something like HTMX.. Latest version: 1.0.0, last published: a minute ago....

View Article

Output function name based on constant string

Yeah firebase is quite brittle when it some to this. What I need is: // exposes createOrder export * from "./CreateOrder.mjs" leads to functions[europe-west3-createOrder] When trying: import * as...

View Article


Output function name based on constant string

Actually, I probably want to generate some code for my client based on my Rescript function files. On the server side I have something like: let createOrder: Firebase.Functions.callableFunction<...

View Article

Get typed AST from Rescript file

I believe I want to do the reverse of How do I extract the rescript AST? I have a Rescript file and I want to inspect the (typed) AST of a file. How can I do this? I don’t really know any ocaml, so if...

View Article

Get typed AST from Rescript file

Getting the typed AST isn’t possible without OCaml, but there are some loose plans to expose a subset of the relevant parts of the typed AST as JSON via the @rescript/tools package. A hack, but what...

View Article


Get typed AST from Rescript file

Thanks! That would be something like npx rescript-tools doc src/CreateOrder.res right? This isn’t doing anything right now, so I probably missing something?

View Article


Output function name based on constant string

This might actually be fixed by tweaking the import, though at that point it’d be kinda moot. // exposes createOrder export createOrder from "./CreateOrder.mjs"

View Article

Output function name based on constant string

On the codegen side, you might be able to make use of the generic transform of GitHub - zth/rescript-embed-lang: A general purpose PPX and library for embedding other languages into ReScript, via code...

View Article

Get typed AST from Rescript file

I installed sudo apt install musl and this started working. That json does (more or less) contain what I need. Thanks a bunch @zth!

View Article

Is there a docs page listing the built-in/prelude types, non-primitive types?

I can’t find a docs page in the language manual or Core docs which lists stuff that is automatically included? What I’m thinking of is an authoritative page that says option and result are...

View Article


Image may be NSFW.
Clik here to view.

Is there a docs page listing the built-in/prelude types, non-primitive types?

These are found under the Language Features section of the docs. ReScript Documentation Language Features Overview | ReScript Language Manual A quick overview on ReScript's syntax It’s missing...

View Article

Image may be NSFW.
Clik here to view.

Is there a docs page listing the built-in/prelude types, non-primitive types?

jderochervlk: Do you have any examples from other languages that show the type of info you are looking for? The tricky bit is most languages I’m familiar with have specific modules from their standard...

View Article


Get typed AST from Rescript file

Related shower thought: maybe producing some web assembly binary (assuming that is easy in OCAML) that exposes this could be an interesting route to explore.

View Article

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

Very interesting! Thank you, for sharing your work! I was wondering if there were specific reasons you chose string for path and method? In case you haven’t come across this project: I really enjoy...

View Article


Why do `.resi` and `.res` files require defining records twice (once in each...

I tried using a .resi file to help hide an external I didn’t want any code to have access to, but I personally found it annoying having to copy-and-paste the same type definition for a record in both...

View Article

Image may be NSFW.
Clik here to view.

Broken example code in Belt api

Hi I’m in the process of learning ReScript and I noticed some of the code examples in the Belt documentation are out of date. On this page ReScript Documentation Belt | ReScript API The ReScript...

View Article

Image may be NSFW.
Clik here to view.

Why do `.resi` and `.res` files require defining records twice (once in each...

there’s a solution to this: Type duplication between interface file and implementation In my opinion it’s an issue that should be solved by a better IDE support, but if you’re looking for a solution...

View Article
Browsing all 1794 articles
Browse latest View live