-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20642 from storybookjs/vite/type-cleanup
Vite: TypeScript type cleanup
- Loading branch information
Showing
42 changed files
with
396 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export type { StorybookConfig } from '@storybook/builder-vite'; | ||
export * from './types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import type { StorybookConfig } from '@storybook/builder-vite'; | ||
import type { PresetProperty } from '@storybook/types'; | ||
import type { StorybookConfig } from './types'; | ||
|
||
export const core: StorybookConfig['core'] = { | ||
export const core: PresetProperty<'core', StorybookConfig> = { | ||
builder: '@storybook/builder-vite', | ||
renderer: '@storybook/html', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import type { StorybookConfig as StorybookConfigBase } from '@storybook/types'; | ||
import type { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite'; | ||
|
||
type FrameworkName = '@storybook/html-vite'; | ||
type BuilderName = '@storybook/builder-vite'; | ||
|
||
export type FrameworkOptions = { | ||
builder?: BuilderOptions; | ||
}; | ||
|
||
type StorybookConfigFramework = { | ||
framework: | ||
| FrameworkName | ||
| { | ||
name: FrameworkName; | ||
options: FrameworkOptions; | ||
}; | ||
core?: StorybookConfigBase['core'] & { | ||
builder?: | ||
| BuilderName | ||
| { | ||
name: BuilderName; | ||
options: BuilderOptions; | ||
}; | ||
}; | ||
}; | ||
|
||
/** | ||
* The interface for Storybook configuration in `main.ts` files. | ||
*/ | ||
export type StorybookConfig = Omit< | ||
StorybookConfigBase, | ||
keyof StorybookConfigVite | keyof StorybookConfigFramework | ||
> & | ||
StorybookConfigVite & | ||
StorybookConfigFramework; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export type { StorybookConfig } from '@storybook/builder-vite'; | ||
export * from './types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import type { StorybookConfig as StorybookConfigBase } from '@storybook/types'; | ||
import type { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite'; | ||
|
||
type FrameworkName = '@storybook/preact-vite'; | ||
type BuilderName = '@storybook/builder-vite'; | ||
|
||
export type FrameworkOptions = { | ||
builder?: BuilderOptions; | ||
}; | ||
|
||
type StorybookConfigFramework = { | ||
framework: | ||
| FrameworkName | ||
| { | ||
name: FrameworkName; | ||
options: FrameworkOptions; | ||
}; | ||
core?: StorybookConfigBase['core'] & { | ||
builder?: | ||
| BuilderName | ||
| { | ||
name: BuilderName; | ||
options: BuilderOptions; | ||
}; | ||
}; | ||
}; | ||
|
||
/** | ||
* The interface for Storybook configuration in `main.ts` files. | ||
*/ | ||
export type StorybookConfig = Omit< | ||
StorybookConfigBase, | ||
keyof StorybookConfigVite | keyof StorybookConfigFramework | ||
> & | ||
StorybookConfigVite & | ||
StorybookConfigFramework; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export type { StorybookConfig } from '@storybook/builder-vite'; | ||
export * from './types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import type { StorybookConfig as StorybookConfigBase } from '@storybook/types'; | ||
import type { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite'; | ||
|
||
type FrameworkName = '@storybook/react-vite'; | ||
type BuilderName = '@storybook/builder-vite'; | ||
|
||
export type FrameworkOptions = { | ||
builder?: BuilderOptions; | ||
}; | ||
|
||
type StorybookConfigFramework = { | ||
framework: | ||
| FrameworkName | ||
| { | ||
name: FrameworkName; | ||
options: FrameworkOptions; | ||
}; | ||
core?: StorybookConfigBase['core'] & { | ||
builder?: | ||
| BuilderName | ||
| { | ||
name: BuilderName; | ||
options: BuilderOptions; | ||
}; | ||
}; | ||
}; | ||
|
||
/** | ||
* The interface for Storybook configuration in `main.ts` files. | ||
*/ | ||
export type StorybookConfig = Omit< | ||
StorybookConfigBase, | ||
keyof StorybookConfigVite | keyof StorybookConfigFramework | ||
> & | ||
StorybookConfigVite & | ||
StorybookConfigFramework; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export type { StorybookConfig } from '@storybook/builder-vite'; | ||
export * from './types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import type { StorybookConfig as StorybookConfigBase } from '@storybook/types'; | ||
import type { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite'; | ||
|
||
type FrameworkName = '@storybook/svelte-vite'; | ||
type BuilderName = '@storybook/builder-vite'; | ||
|
||
export type FrameworkOptions = { | ||
builder?: BuilderOptions; | ||
}; | ||
|
||
type StorybookConfigFramework = { | ||
framework: | ||
| FrameworkName | ||
| { | ||
name: FrameworkName; | ||
options: FrameworkOptions; | ||
}; | ||
core?: StorybookConfigBase['core'] & { | ||
builder?: | ||
| BuilderName | ||
| { | ||
name: BuilderName; | ||
options: BuilderOptions; | ||
}; | ||
}; | ||
}; | ||
|
||
/** | ||
* The interface for Storybook configuration in `main.ts` files. | ||
*/ | ||
export type StorybookConfig = Omit< | ||
StorybookConfigBase, | ||
keyof StorybookConfigVite | keyof StorybookConfigFramework | ||
> & | ||
StorybookConfigVite & | ||
StorybookConfigFramework; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export * from '@storybook/svelte-vite'; | ||
export * from './types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import type { StorybookConfig as StorybookConfigBase } from '@storybook/types'; | ||
import type { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite'; | ||
|
||
type FrameworkName = '@storybook/sveltekit'; | ||
type BuilderName = '@storybook/builder-vite'; | ||
|
||
export type FrameworkOptions = { | ||
builder?: BuilderOptions; | ||
}; | ||
|
||
type StorybookConfigFramework = { | ||
framework: | ||
| FrameworkName | ||
| { | ||
name: FrameworkName; | ||
options: FrameworkOptions; | ||
}; | ||
core?: StorybookConfigBase['core'] & { | ||
builder?: | ||
| BuilderName | ||
| { | ||
name: BuilderName; | ||
options: BuilderOptions; | ||
}; | ||
}; | ||
}; | ||
|
||
/** | ||
* The interface for Storybook configuration in `main.ts` files. | ||
*/ | ||
export type StorybookConfig = Omit< | ||
StorybookConfigBase, | ||
keyof StorybookConfigVite | keyof StorybookConfigFramework | ||
> & | ||
StorybookConfigVite & | ||
StorybookConfigFramework; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export type { StorybookConfig } from '@storybook/builder-vite'; | ||
export * from './types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import type { StorybookConfig as StorybookConfigBase } from '@storybook/types'; | ||
import type { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite'; | ||
|
||
type FrameworkName = '@storybook/vue-vite'; | ||
type BuilderName = '@storybook/builder-vite'; | ||
|
||
export type FrameworkOptions = { | ||
builder?: BuilderOptions; | ||
}; | ||
|
||
type StorybookConfigFramework = { | ||
framework: | ||
| FrameworkName | ||
| { | ||
name: FrameworkName; | ||
options: FrameworkOptions; | ||
}; | ||
core?: StorybookConfigBase['core'] & { | ||
builder?: | ||
| BuilderName | ||
| { | ||
name: BuilderName; | ||
options: BuilderOptions; | ||
}; | ||
}; | ||
}; | ||
|
||
/** | ||
* The interface for Storybook configuration in `main.ts` files. | ||
*/ | ||
export type StorybookConfig = Omit< | ||
StorybookConfigBase, | ||
keyof StorybookConfigVite | keyof StorybookConfigFramework | ||
> & | ||
StorybookConfigVite & | ||
StorybookConfigFramework; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export type { StorybookConfig } from '@storybook/builder-vite'; | ||
export * from './types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.