Quantcast
Viewing all articles
Browse latest Browse all 1829

Gauging interest on outputting certain ReScript comments to JS

How about killing two birds with one stone? The @@directive decorator takes any string literal and outputs it at the top of the generated JavaScript file. Instead, how about outputting it at the corresponding source position? Eg

// ...other stuff...

@@directive(`/** Sum two numbers */`)
let sum = (x, y) => x + y

Viewing all articles
Browse latest Browse all 1829

Trending Articles