mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-10 00:12:22 +08:00
15 lines
336 B
TypeScript
15 lines
336 B
TypeScript
import merge from './lib/merge';
|
|
|
|
import type { State } from './index';
|
|
|
|
interface Addition {
|
|
[key: string]: any;
|
|
}
|
|
type Additions = Addition[];
|
|
|
|
// Returns the initialState of the app
|
|
const main = (...additions: Additions): State =>
|
|
additions.reduce((acc: State, item) => merge<State>(acc, item), {} as any);
|
|
|
|
export default main;
|