-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Better typings for Promise.resolve(), like #31117 #33074
Conversation
d5b8656
to
ed55bc5
Compare
3523d88
to
8607e69
Compare
4aee6f8
to
e6f14d6
Compare
0b9b4e6
to
51538c3
Compare
a65e8c7
to
acd3105
Compare
6a7c26e
to
b68a1ba
Compare
ab032d7
to
3222ba5
Compare
7aefd80
to
29b3ada
Compare
@rbuckton Is this ready to merge now? |
I'd like to run the RWC and user tests once more to be sure. |
@typescript-bot run dt |
Heya @rbuckton, I've started to run the diff-based user code test suite on this PR at 915863f. You can monitor the build here. Update: The results are in! |
@rbuckton |
This still causes a build break in older versions of firebase-sdk, but since this only occurs in an outdated snapshot of firebase in our RWC tests and not in the most recent version of firebase, this change seems acceptable.
|
Note that this breaks declare const UNDEFINED_VOID_ONLY: unique symbol;
export function act(callback: () => void | { [UNDEFINED_VOID_ONLY]: never }): DebugPromiseLike;
// Intentionally doesn't extend PromiseLike<never>.
// Ideally this should be as hard to accidentally use as possible.
export interface DebugPromiseLike {
// the actual then() in here is 1-ary, but that doesn't count as a PromiseLike.
then(onfulfilled: (value: never) => never, onrejected: (reason: never) => never): never;
}
// @ts-expect-error <-- this is no longer an error
Promise.resolve(act(() => {})); I think this change is still OK, I just wanted to report on the break. |
This breaks vscode in a few places too, so we're going to revert it for 4.8 to give us a chance to figure out what to do. |
Component commits: c28ee65 Revert "Better typings for Promise.resolve(), like microsoft#31117 (microsoft#33074)" This reverts commit 040c121.
Component commits: c28ee65 Revert "Better typings for Promise.resolve(), like microsoft#31117 (microsoft#33074)" This reverts commit 040c121. Co-authored-by: Nathan Shively-Sanders <nathansa@microsoft.com>
No description provided.