|
| 1 | +import type * as normal from './index' |
| 2 | +import type * as rsc from './index-rsc' |
| 3 | + |
| 4 | +// checks to make sure we didn't forgot to replicate any exports |
| 5 | + |
| 6 | +// eslint-disable-next-line @typescript-eslint/no-unused-vars |
| 7 | +const _check: typeof normal = {} as typeof rsc |
| 8 | +// eslint-disable-next-line @typescript-eslint/no-unused-vars |
| 9 | +const _check2: typeof rsc = {} as typeof normal |
| 10 | + |
| 11 | +// ------------------------------------------------------------------------------------- |
| 12 | + |
| 13 | +function throwNotSupportedError( |
| 14 | + // eslint-disable-next-line @typescript-eslint/no-unused-vars |
| 15 | + ...args: any[] |
| 16 | +): any { |
| 17 | + throw new Error( |
| 18 | + 'This function is not supported in React Server Components. Please only use this export in a Client Component.' |
| 19 | + ) |
| 20 | +} |
| 21 | + |
| 22 | +export { |
| 23 | + throwNotSupportedError as batch, |
| 24 | + throwNotSupportedError as Provider, |
| 25 | + throwNotSupportedError as connect, |
| 26 | + throwNotSupportedError as useSelector, |
| 27 | + throwNotSupportedError as useDispatch, |
| 28 | + throwNotSupportedError as useStore, |
| 29 | + throwNotSupportedError as createDispatchHook, |
| 30 | + throwNotSupportedError as createSelectorHook, |
| 31 | + throwNotSupportedError as createStoreHook, |
| 32 | +} |
| 33 | +export const ReactReduxContext = {} as any |
| 34 | +export { default as shallowEqual } from './utils/shallowEqual' |
0 commit comments