We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
之前, Promise 和 Promise<Promise> 是两个不同的类型.
以前, Promise<Promise<T>>.then(v => type v is Promise<T>). 想要解决这个问题可以通过 await Promise<Promise<T>> 拿到 T.
Promise<Promise<T>>.then(v => type v is Promise<T>)
await Promise<Promise<T>>
T
现在, 终于可以不用再为这个操心了.
microsoft/TypeScript#45350
用法举例: https://www.typescriptlang.org/play?ts=4.5.0-dev.20210910#code/C4TwDgpgBGULxQAoCcD2BbAlgZwgHgDsBXdAIwmQD4BuAKFEigEN4oBBAdyc2AgBM8YGrSA
The text was updated successfully, but these errors were encountered:
No branches or pull requests
之前, Promise 和 Promise<Promise> 是两个不同的类型.
以前,
Promise<Promise<T>>.then(v => type v is Promise<T>)
.想要解决这个问题可以通过
await Promise<Promise<T>>
拿到T
.现在, 终于可以不用再为这个操心了.
microsoft/TypeScript#45350
用法举例: https://www.typescriptlang.org/play?ts=4.5.0-dev.20210910#code/C4TwDgpgBGULxQAoCcD2BbAlgZwgHgDsBXdAIwmQD4BuAKFEigEN4oBBAdyc2AgBM8YGrSA
The text was updated successfully, but these errors were encountered: