Skip to content

Commit b926775

Browse files
committed
fix: add type-safety to preview config
1 parent e5d32ea commit b926775

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

site/.storybook/preview.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
* @typedef {import("react").ReactElement} ReactElement
99
* @typedef {import("react").PropsWithChildren} PropsWithChildren
1010
* @typedef {import("react").FC<PropsWithChildren>} FC
11+
*
1112
* @typedef {import("@storybook/react").StoryContext} StoryContext
13+
* @typedef {import("@storybook/react").Preview} Preview
1214
*
1315
* @typedef {(Story: FC, Context: StoryContext) => React.JSX.Element} Decorator A
1416
* Storybook decorator function used to inject baseline data dependencies into
@@ -31,9 +33,10 @@ import themes from "../src/theme";
3133

3234
DecoratorHelpers.initializeThemeState(Object.keys(themes), "dark");
3335

34-
/**@type {readonly Decorator[]} */
36+
/** @type {readonly Decorator[]} */
3537
export const decorators = [withRouter, withQuery, withHelmet, withTheme];
3638

39+
/** @type {Preview["parameters"]} */
3740
export const parameters = {
3841
options: {
3942
storySort: {

0 commit comments

Comments
 (0)