Skip to content

Commit

Permalink
Insert any assertion to silence TS errors
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaemami59 committed Feb 9, 2024
1 parent d887a9c commit 656f731
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/index-rsc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ const _check2: typeof rsc = {} as typeof normal

// -------------------------------------------------------------------------------------

function throwNotSupportedError(
const throwNotSupportedError = ((
// eslint-disable-next-line @typescript-eslint/no-unused-vars
...args: any[]
): any {
): any => {
throw new Error(
'This function is not supported in React Server Components. Please only use this export in a Client Component.',
)
}
}) as any

export {
throwNotSupportedError as batch,
throwNotSupportedError as Provider,
throwNotSupportedError as batch,
throwNotSupportedError as connect,
throwNotSupportedError as useSelector,
throwNotSupportedError as useDispatch,
throwNotSupportedError as useStore,
throwNotSupportedError as createDispatchHook,
throwNotSupportedError as createSelectorHook,
throwNotSupportedError as createStoreHook,
throwNotSupportedError as useDispatch,
throwNotSupportedError as useSelector,
throwNotSupportedError as useStore,
}
export const ReactReduxContext = {} as any
export { default as shallowEqual } from './utils/shallowEqual'

0 comments on commit 656f731

Please sign in to comment.