Skip to content

Commit

Permalink
Merge pull request #30042 from storybookjs/yann/next-vite-docgen-types
Browse files Browse the repository at this point in the history
Nextjs-Vite: Fix docgen types in main config
  • Loading branch information
yannbf authored Dec 13, 2024
2 parents 881bed7 + bb323de commit 27eb245
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions code/frameworks/experimental-nextjs-vite/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import type {
CompatibleString,
StorybookConfig as StorybookConfigBase,
} from 'storybook/internal/types';
import type { CompatibleString } from 'storybook/internal/types';

import type { BuilderOptions, StorybookConfigVite } from '@storybook/builder-vite';
import type { BuilderOptions } from '@storybook/builder-vite';
import type { StorybookConfig as StorybookConfigReactVite } from '@storybook/react-vite';

type FrameworkName = CompatibleString<'@storybook/experimental-nextjs-vite'>;
type BuilderName = CompatibleString<'@storybook/builder-vite'>;
Expand All @@ -21,7 +19,7 @@ type StorybookConfigFramework = {
name: FrameworkName;
options: FrameworkOptions;
};
core?: StorybookConfigBase['core'] & {
core?: StorybookConfigReactVite['core'] & {
builder?:
| BuilderName
| {
Expand All @@ -32,9 +30,5 @@ type StorybookConfigFramework = {
};

/** The interface for Storybook configuration in `main.ts` files. */
export type StorybookConfig = Omit<
StorybookConfigBase,
keyof StorybookConfigVite | keyof StorybookConfigFramework
> &
StorybookConfigVite &
StorybookConfigFramework & {};
export type StorybookConfig = Omit<StorybookConfigReactVite, keyof StorybookConfigFramework> &
StorybookConfigFramework;

0 comments on commit 27eb245

Please sign in to comment.