Skip to content

Commit

Permalink
Type fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lsegurado committed Jul 27, 2024
1 parent 69a0664 commit 4b9d387
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/stories/Preview.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
import type { BaseAnnotations, Renderer, Args } from "@storybook/types";
import type { BaseAnnotations, Renderer, Args, Canvas } from "@storybook/types";

export type MichiRenderer = Record<keyof Renderer, Element>;
export interface MichiRenderer extends Renderer {
/** What is the type of the `component` annotation in this renderer? */
component: Element;
/** What does the story function return in this renderer? */
storyResult: Element;
/** What type of element does this renderer render to? */
canvasElement: Element;
mount(): Promise<Canvas>;
T?: Element;
}
export type Preview<TArgs = Args> = BaseAnnotations<MichiRenderer, TArgs>;

0 comments on commit 4b9d387

Please sign in to comment.