-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
DuplicateAn existing issue was already createdAn existing issue was already createdExternalRelates to another program, environment, or user action which we cannot control.Relates to another program, environment, or user action which we cannot control.QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code
Description
The following TypeScript with async/await...
public async get(from: number, to: number): Promise<Array<M>> {
let models: Array<M> = await this.persistant_repo.get(from, to);
produces the following JavaScript with a yield outside of a generator...
ModelsRepoDecorator.prototype.get = function (from, to) {
var _this = this;
var models = yield this.persistant_repo.get(from, to);
I'm not certain, but I don't think yield
should work outside of a generator. I'm running tsc src/**/*.ts --outDir dist --sourceMap
and my tsconfig looks like this...
{
"compilerOptions": {
"module": "commonjs",
"target": "ES6",
"noImplicitAny": true,
"removeComments": true,
"preserveConstEnums": true,
"sourceMap": true,
"jsx": "react"
}
}
I think this may be a duplicate of #4135, but I'm not sure how the solution there can be applied here.
Metadata
Metadata
Assignees
Labels
DuplicateAn existing issue was already createdAn existing issue was already createdExternalRelates to another program, environment, or user action which we cannot control.Relates to another program, environment, or user action which we cannot control.QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code