Skip to content

Formatter formats away await on module #6300

Closed
@zth

Description

@zth

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions