Repository navigation
|
Hi. When importing stories and writing tests, I was importing
code: const { container } = render(<Success onSubmit={handleSubmit} />);
await Success.play({ canvasElement: container });I do not get this error if I use
From the source code of /**
* T represents the whole ES module of a stories file. K of T means named exports (basically the Story type)
* 1. pick the keys K of T that have properties that are Story<AnyProps>
* 2. infer the actual prop type for each Story
* 3. reconstruct Story with Partial. Story<Props> -> Story<Partial<Props>>
*/
export type StoriesWithPartialProps<TFramework extends AnyFramework, TModule> = {
// @TODO once we can use Typescript 4.0 do this to exclude nonStory exports:
// replace [K in keyof TModule] with [K in keyof TModule as TModule[K] extends ComposedStory<any> ? K : never]
[K in keyof TModule]: TModule[K] extends ComposedStory<infer _, infer TProps>
- ? AnnotatedStoryFn<TFramework, Partial<TProps>>
+ ? StoryFn<TFramework, Partial<TProps>>
: unknown;
};So I have two questions
This is my environment:
Thanks. |
Answered by
ygkn
Jun 13, 2023
Replies: 1 comment
|
This is resolved in 7.0 |
0 replies
Answer selected by
ygkn
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is resolved in 7.0