[Bug]: expect matchers from storybook/test
ignores their generic parameter
#31563
Labels
storybook/test
ignores their generic parameter
#31563
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
I originally posted this here, but I decided to open a new issue for this.
In short, type definitions for some of the
expect
matchers fromstorybook/test
are (still) not very good; according to the definition they are generic (accepts a type parameter), but actually the type parameter is meaningless.Notably, this makes a deviation from
vitest
matchers whichstorybook/test
'sexpect
is based on.Reproduction link
https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBAbzgUwB5mQY3gQwM5x4zQCeARhBANYCi6W8AvnAGZQQhwBERpF1AehjIiXANxwBAuDBIY8ALjgBOAHQAGDQFoomVQBYAUKEixEKetjj44AN2DCidDFeZsO3e45jjJ02fJKAMyqAIwGhsYAdsJQLDiYyHAAYpQA8mQAVoiGcKyUSlEAriBkyFBihoyRmBBRRHBkOFAZ2QC8OXlNUEpcABLIADaDEFwANFWVhrxQ5JS0ljAAFKEATEEAlKrEALI4MJgAFq0MADypEK0AfEvdrRsSUnAAchAoUOxQkV4iMM4MK3WW12+yOJ2w53SWRudyyD0MTzySORKNRaPReQAeticXAaB9oABCBHSACCUAA5iVkDE4BAWDI5EkAORIbpKIhQYBRCkSRjMuDAAhRCC4PB4YAUqI4MiDJLEOBgZo4EDIWJ0hkBFkXVrM1QkpEABXYGFgJDgzJYlAFQrgICFEp5gqijIwFrZzQ5MC5PL5ArIRXgUGQAEcisBgwATZ2u7VQzJ6oA
Reproduction steps
System
Additional context
I believe the fix in #31395 wasn't perfect. The fix does preserve type parameters from generic matchers, but the function signatures are still broken after
Promisify
.The text was updated successfully, but these errors were encountered: