Skip to content

Another case of inlining breaking async #5789

Closed
@cknitt

Description

@cknitt

Broken.resi:

let broken: unit => promise<unit>

Broken.res:

@module("SomeModule")
external someExternal: unit => promise<unit> = "someExternal"

let doSomethingAsync = async () => {
  await someExternal()
}

let broken = () => doSomethingAsync()

JS output does not compile because function has no async:

function broken(param) {
  return await SomeModule.someExternal();
}

/cc @cristianoc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions