Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nextjs-Vite: Fix docgen types in main config #30042

Merged
merged 2 commits into from
Dec 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Loading