4 ms·
I took a look at rescript's facillities for migration from JS and at step 1 (https://rescript-lang.org/docs/manual/latest/converting-from-js https://rescript-la
by miffy900 4y ago
I took a look at rescript's facillities for migration from JS and at step 1 (https://rescript-lang.org/docs/manual/latest/converting-from-js https://rescript-lang.org/docs/manual/latest/converting-from...), it tells you:
> First, copy the entire file content over to a new file called src/Main.res by using our %%raw JS embedding trick:
> %%raw(`const school = require('school'); etc. `)
I stopped reading there - I'm sorry but that is horrifying. Wrapping JS in in a big backtick string?! No. That's even worse that Dart-JS interop.
- Throw999999 4y agoThat is not how you normally do interop in Rescript.
- giraffe_lady 4y agook