(
config: StoreConfig<any, any, any, any, any, any> & {
context: StoreContext | ((input: unknown) => StoreContext);
selectors?: StoreSelectorsConfig<any>;
}
)
| 726 | {} |
| 727 | >; |
| 728 | export function createStoreLogic( |
| 729 | config: StoreConfig<any, any, any, any, any, any> & { |
| 730 | context: StoreContext | ((input: unknown) => StoreContext); |
| 731 | selectors?: StoreSelectorsConfig<any>; |
| 732 | } |
| 733 | ): any { |
| 734 | return { |
| 735 | createStore(input?: unknown) { |
| 736 | const context = |
| 737 | typeof config.context === 'function' |
| 738 | ? config.context(input) |
| 739 | : config.context; |
| 740 | |
| 741 | const store = createStore({ |
| 742 | ...config, |
| 743 | context |
| 744 | }); |
| 745 | |
| 746 | return config.selectors |
| 747 | ? attachSelectors(store, config.selectors) |
| 748 | : store; |
| 749 | } |
| 750 | }; |
| 751 | } |
| 752 | |
| 753 | declare global { |
| 754 | interface SymbolConstructor { |
no outgoing calls
no test coverage detected
searching dependent graphs…