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

Merge tuples types

Thanks for pointing this out! I didn’t realize it after you posted your sample.

View Article


How to get command line input?

I know this was over a year ago but in trying to find a solution for ReScript Bun this question is the only thing in the forum so thought I’d post a solution I cobbled together after a lot of...

View Article


Accessing and tweaking Dom elements (maybe related to type conversion?)

Hi, I’m trying to convert myself from Ts/Js to Rescript just because I want to see the appeal of it. I hope to get some help on what is the right way to do this, as an example: select all elements of...

View Article

Image may be NSFW.
Clik here to view.

Confusion regarding generic type function definition inside of another function

I must say I don’t understand what you mean Type variables are scoped to the top level definition so by naming it you are forcing it to take on a single type for each invocation of the top level...

View Article

Image may be NSFW.
Clik here to view.

Confusion regarding generic type function definition inside of another function

ice: the top level function in question is main(), so with each main() invocation, I only get one type of 'a ? then why does the trace function defined in global scope work? wouldn’t it just be 1 type...

View Article


Accessing and tweaking Dom elements (maybe related to type conversion?)

The DOM types that ship with the compiler are pretty bare bones, but here’s a couple of suggestions to make it a bit easier: You can use JsxDOMStyle.t instead of Dom.cssStyleDeclaration to get a fully...

View Article

Confusion regarding generic type function definition inside of another function

I see. While I can accept it for what it is, it still feels really inconsistent. I would expect the global scope function with 'a to not having polymorphism unless explicitly stated as well.

View Article

Accessing and tweaking Dom elements (maybe related to type conversion?)

I’m abit confuse about type nodeListOf<'a>. What does it mean when you are not giving thing to that type? How do you know about JsxDOMStyle? (From the javascript thingy I expected the style to...

View Article


Image may be NSFW.
Clik here to view.

Accessing and tweaking Dom elements (maybe related to type conversion?)

ice: I’m abit confuse about type nodeListOf<'a>. What does it mean when you are not giving thing to that type? Not sure what you mean here. That you’re not giving it a definition? That means...

View Article


Confusion regarding generic type function definition inside of another function

I don’t see how it’s inconsistent. Types are inferred to be as general as possible given the constraints. At the top-level, there are no constraints and the most general type is polymorphic. As an...

View Article

Looking for a Neovim theme

Hi ! I started using Neovim and I can’t find a theme that supports ReScript correctly. Someone had recommandations ? Thanks !

View Article

Accessing and tweaking Dom elements (maybe related to type conversion?)

Thank you for your respond!! Not sure what you mean here. That you’re not giving it a definition? That means it’s an abstract type that you can’t interact with indirectly. You have to write bindings...

View Article

Confusion regarding generic type function definition inside of another function

wait I think I got what you mean. So every invocation is an expression let a = 4 // Top level Expression 1 Console.log(55) // Top level Expression 2 Console.log("whatever") // Top level Expression 3...

View Article


Looking for a Neovim theme

Maybe one of @aspeddro @shulhi @CarlOlson @FreddieGilbraith @dkirchhof knows.

View Article

Looking for a Neovim theme

You can use Rescript treesitter and use any themes that support treesitter. Personally, I use Gruvbox.

View Article


Looking for a Neovim theme

I’m using rose-pine/neovim (mostly the light, sometimes the dark one). But I think most important is to use the rescript treesitter plugin (GitHub - rescript-lang/tree-sitter-rescript: ReScript parser...

View Article

Image may be NSFW.
Clik here to view.

Looking for a Neovim theme

I added tree-sitter but the syntax color seems pretty bad (trying gruvbox) Did I miss something ? Thanks for your help btw

View Article


Looking for a Neovim theme

I really missed something ! I didn’t put the language in the ensure_installed options. return { "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = { "rescript", "gitignore", } }, }

View Article

Nameof operator

My latest shot at this is by using the rescript-tools doc command. (from @rescript/tools) In a simple script I get the json ast from a file, traverse the nodes a bit and generate some simple code....

View Article

Image may be NSFW.
Clik here to view.

Accessing and tweaking Dom elements (maybe related to type conversion?)

ice: I see. It’s the nature of @get_index / @set_index, right? Because they seem to just access the raw external property from Javascript so they can’t really check for type. Even if I define it as...

View Article
Browsing all 1759 articles
Browse latest View live