Skip to content

__awaiter is not defined #6113

@tinganho

Description

@tinganho

Was there something changed recently on the async/await for typescript? I'm using typescript@next to compile my project.

With below version it works fine:

$ tsc --version
Version 1.8.0-dev.20151210

But for this version it doesn't:

$ tsc --version
Version 1.8.0-dev.20151216

I got a runtime error:

ReferenceError: __awaiter is not defined

And in my code I have a bunch of object literals that has async functions:

let a: {
  f: async () => { ... }
}

I'm targetting es6. Though I cannot produce a self-contained test. Even though I compile the whole file excluding dependecies it includes the __awaiter. Only when I compile the whole project, just one file misses to have __awaiter on top of the file.

There must have been some very recent change. Since my CI started to bark today.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issueHigh Priority

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions