Skip to content
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

clean @ts-expect-error #12664

Merged
merged 2 commits into from
Apr 12, 2022
Merged

clean @ts-expect-error #12664

merged 2 commits into from
Apr 12, 2022

Conversation

F3n67u
Copy link
Contributor

@F3n67u F3n67u commented Apr 11, 2022

Summary

microsoft/TypeScript#24587 is solved by microsoft/TypeScript#44512. so we could remove the @ts-expect-error now.

Test plan

Green CI

@F3n67u F3n67u changed the title remove @ts-expect-error clean @ts-expect-error Apr 11, 2022
@@ -123,5 +123,5 @@ export interface GlobalAdditions extends TestFrameworkGlobals {
export interface Global
extends GlobalAdditions,
Omit<typeof globalThis, keyof GlobalAdditions> {
[extras: string]: unknown;
[extras: string | symbol]: unknown;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm.. Perhaps instead of tweaking this one, it would be better to extend Global locally inside jest-runtime/src/types.ts. In somewhat similar way:

https://github.com/facebook/jest/blob/fe5f37038c3771aa9014bc351c0bddb04c35da7d/packages/jest-circus/src/types.ts#L10-L23

@mrazauskas
Copy link
Contributor

Co-authored-by: Tom Mrazauskas <tom@mrazauskas.de>
@F3n67u
Copy link
Contributor Author

F3n67u commented Apr 12, 2022

If I don’t ask to much (; These also could be fixed:

https://github.com/facebook/jest/blob/fe5f37038c3771aa9014bc351c0bddb04c35da7d/packages/expect/src/jestMatchersObject.ts#L41-L51

@mrazauskas I tried. but don't know how to extend globalThis with symbol property.

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@SimenB SimenB merged commit 8a8eb36 into jestjs:main Apr 12, 2022
@F3n67u F3n67u deleted the remove-ts-expect branch April 12, 2022 12:47
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants