Skip to content

Vague error message with async functions #11396

Closed
@DanielRosenwasser

Description

@DanielRosenwasser
async function foo() {
    return "hi";
}

First thing I get is An async function must have a valid awaitable return type.

From a UX perspective, this is very confusing. If you add es2015.promise to your lib, it goes away.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions