Closed
Description
- Formatting
- Handling let module Dynamic import in expression #6310
Consider this example:
let main = async () => {
module Utils = await MathUtils
let twoPlusTwo = Utils.add(2, 2)
RescriptCore.Console.log(twoPlusTwo)
}
When formatting this, the formatter removes the await
on the module.
Playground example (load this and then press format): https://rescript-lang.org/try?version=v11.0.0-beta.1&code=DYUwLgBAtghglgOwgXgjAzgTwQYwgCgEoUA+CAbwCgJoB7AEwFdQIBVMOYdFNAd3kgBZGGAAW7TukrUIoSGF60ACsEboAKop4SuAOhj16+AEwAaCMcIyASiHQ4ATnAAOYAMK0HIXR4TpaoLrAtADm+ArKqhqKVgC+QA