-
Notifications
You must be signed in to change notification settings - Fork 12.8k
async/await compiles to yield outside of a generator #6242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm not seeing this behavior. Can you try out the current nightly by running |
I have new errors on the nightly build, will look into this after Christmas @DanielRosenwasser, merry Christmas! 😄 |
@DanielRosenwasser the compiler seems to be ignoring my tsconfig.json file. |
Can you share a minimal repro? Or share the project itself? |
Nothing has changed in my project, on the nightly build you can use my tsconfig with a typescript file using a promise, run the command I shared above and you'll hit |
Ok fixed those errors by just stuffing all of my options into a command (#5980 can't come soon enough).
Now I get module errors like...
Judging by some of the type errors I'm getting in addition to this, it's also ignoring my typings directory 😢 Sublime Text isn't showing any of these errors with the TypeScript package. |
Everything compiles fine, but when I run {
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"removeComments": true,
"preserveConstEnums": true,
"sourceMap": true,
"jsx": "react",
"outDir": "es6",
"rootDir": "src"
},
"exclude": [
"node_modules",
"typings"
]
}
|
Without knowing more about your actual project, it's difficult for me to diagnose the issue. Can you share the repo at all? |
Yeah sorry, I understand that, I can't share the repo though unfortunately. My original issue is resolved in the nightly so I'm happy to close this issue, however I think there are some issues in the nightly around node_modules and typings. If I manage to figure out exactly why I'll create a new issue. Thanks for trying to help @DanielRosenwasser. |
For the record I've isolated my TS2307 issue in https://github.com/ryansmith94/TS2307-Issue @DanielRosenwasser
Quoted from a message I put on Gitter. |
That issue has been resolved on Gitter. |
In the interest of helping people who run into any similar issue, here is the link to the resolution in the Gitter chat on December 29, 2015 5:29 PM. |
The following TypeScript with async/await...
produces the following JavaScript with a yield outside of a generator...
I'm not certain, but I don't think
yield
should work outside of a generator. I'm runningtsc src/**/*.ts --outDir dist --sourceMap
and my tsconfig looks like this...I think this may be a duplicate of #4135, but I'm not sure how the solution there can be applied here.
The text was updated successfully, but these errors were encountered: