Closed IanVS closed 2 years ago
Thanks for opening this issue @IanVS ! @ghengeveld I think this will interest you quite a bit
The problem is in @storybook/testing-library. It needs to rewrite some type definitions to return T | Promise<T>
.
Opened an issue here: https://github.com/storybookjs/testing-library/issues/10
Describe the bug I'm not sure if this is necessarily a bug, but it's a bit unclear what the right thing to do is. When I
await
my userEvent calls, as directed by await-interactions, I get a typescript warning:I guess that's because the typescript type from user-event is:
So, it's unclear where the problem is, but there seems to be definite disagreement between this linting rule and typescript. :)
To Reproduce Steps to reproduce the behavior: In a typescript project, import
userEvent
from@storybook/testing-library
, add anawait
, and see the typescript warning.Expected behavior No warning to be shown