Skip to content

Promise.all weirdness in nightlies #409

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

Closed
DanielRosenwasser opened this issue Mar 23, 2020 · 7 comments
Closed

Promise.all weirdness in nightlies #409

DanielRosenwasser opened this issue Mar 23, 2020 · 7 comments
Labels
Playground Issues that affect the Playground

Comments

@DanielRosenwasser
Copy link
Member

The playground seems to have a lot of weirdness [...] with Promise.all. Things like signature help don't even seem to work correctly. I'm not sure exactly what the problem is, but if you do try that code out locally with a nightly version of TypeScript, it should all work fine.

Originally posted by @DanielRosenwasser in microsoft/TypeScript#33752 (comment)

@DanielRosenwasser
Copy link
Member Author

The code that we were trying out had some issues:

(async () => {
    const [num1, num2] = await Promise.all([Promise.resolve(1), Promise.resolve(null)]);
    num1.toString();
})

it had different error messages than locally, and it had problems with triggering signature help. Very strange.

@DanielRosenwasser
Copy link
Member Author

DanielRosenwasser commented Mar 23, 2020

(maybe because of lib.d.ts ordering? but that doesn't explain the signature help stuff)

@orta
Copy link
Contributor

orta commented Mar 23, 2020

I think all the filenames for the lib.d.ts are hardcoded, is there a chance that 3.9 adds a new file?

@orta orta added the Playground Issues that affect the Playground label Mar 23, 2020
@DanielRosenwasser
Copy link
Member Author

I don't think so, but @rbuckton would have more context here.

@DanielRosenwasser
Copy link
Member Author

I think that microsoft/TypeScript#37510 fixes this.

@DanielRosenwasser
Copy link
Member Author

Verified that it does! The problem is that TypeScript internally has a list for ordering the .d.ts files, but it differs from the /// <reference lib="..." /> directives which I believe the playground crawls to concatenate/build.

Sorry for the confusion on this end.

@orta
Copy link
Contributor

orta commented Mar 27, 2020

👍 thanks!

@orta orta closed this as completed Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Playground Issues that affect the Playground
Projects
None yet
Development

No branches or pull requests

2 participants