diff --git a/packages/@react-facet/core/src/helpers/multiObserve.ts b/packages/@react-facet/core/src/helpers/multiObserve.ts index 067e52d7..f68635ca 100644 --- a/packages/@react-facet/core/src/helpers/multiObserve.ts +++ b/packages/@react-facet/core/src/helpers/multiObserve.ts @@ -10,7 +10,7 @@ import { Facet, Unsubscribe, Cleanup, NO_VALUE, ExtractFacetValues } from '../ty * We pass the dependencies of the callback as the second argument so we can leverage the eslint-plugin-react-hooks option for additionalHooks. * Having this as the second argument allows the linter to work. */ -export function multiObserve[], T extends [...Y]>( +export function multiObserve, ...Facet[]], T extends [...Y]>( effect: (...args: ExtractFacetValues) => void | Cleanup, facets: T, ) { diff --git a/packages/@react-facet/core/src/hooks/useFacetCallback.ts b/packages/@react-facet/core/src/hooks/useFacetCallback.ts index 9b1d2a6a..a0b798a0 100644 --- a/packages/@react-facet/core/src/hooks/useFacetCallback.ts +++ b/packages/@react-facet/core/src/hooks/useFacetCallback.ts @@ -13,7 +13,7 @@ import { Facet, NO_VALUE, ExtractFacetValues, NoValue } from '../types' * We pass the dependencies of the callback as the second argument so we can leverage the eslint-plugin-react-hooks option for additionalHooks. * Having this as the second argument allows the linter to work. */ -export function useFacetCallback[], T extends [...Y], K extends [...unknown[]]>( +export function useFacetCallback, ...Facet[]], T extends [...Y], K extends [...unknown[]]>( callback: (...args: ExtractFacetValues) => (...args: K) => M, dependencies: unknown[], facets: T, @@ -31,13 +31,13 @@ export function useFacetCallback[], T extends [...Y] * We pass the dependencies of the callback as the second argument so we can leverage the eslint-plugin-react-hooks option for additionalHooks. * Having this as the second argument allows the linter to work. */ -export function useFacetCallback[], T extends [...Y], K extends [...unknown[]]>( +export function useFacetCallback, ...Facet[]], T extends [...Y], K extends [...unknown[]]>( callback: (...args: ExtractFacetValues) => (...args: K) => M, dependencies: unknown[], facets: T, ): (...args: K) => M | NoValue -export function useFacetCallback[], T extends [...Y], K extends [...unknown[]]>( +export function useFacetCallback, ...Facet[]], T extends [...Y], K extends [...unknown[]]>( callback: (...args: ExtractFacetValues) => (...args: K) => M, dependencies: unknown[], facets: T, diff --git a/packages/@react-facet/core/src/hooks/useFacetEffect.tsx b/packages/@react-facet/core/src/hooks/useFacetEffect.tsx index 623fa27f..6693aa4e 100644 --- a/packages/@react-facet/core/src/hooks/useFacetEffect.tsx +++ b/packages/@react-facet/core/src/hooks/useFacetEffect.tsx @@ -3,7 +3,7 @@ import { Facet, Unsubscribe, Cleanup, NO_VALUE, ExtractFacetValues } from '../ty import { cancelScheduledTask, scheduleTask } from '../scheduler' export const createUseFacetEffect = (useHook: typeof useEffect | typeof useLayoutEffect) => { - return function [], T extends [...Y]>( + return function , ...Facet[]], T extends [...Y]>( effect: (...args: ExtractFacetValues) => void | Cleanup, dependencies: unknown[], facets: T, diff --git a/packages/@react-facet/core/src/hooks/useFacetMap.ts b/packages/@react-facet/core/src/hooks/useFacetMap.ts index dc179b9c..f428f5bf 100644 --- a/packages/@react-facet/core/src/hooks/useFacetMap.ts +++ b/packages/@react-facet/core/src/hooks/useFacetMap.ts @@ -16,7 +16,7 @@ import { EqualityCheck, Facet, NoValue, ExtractFacetValues } from '../types' * * @returns a new facet definition that can be consumed as a regular facet */ -export function useFacetMap[], T extends [...Y]>( +export function useFacetMap, ...Facet[]], T extends [...Y]>( selector: (...args: ExtractFacetValues) => M | NoValue, dependencies: unknown[], facets: T, diff --git a/packages/@react-facet/core/src/hooks/useFacetMemo.ts b/packages/@react-facet/core/src/hooks/useFacetMemo.ts index f498b5a3..5563f2e2 100644 --- a/packages/@react-facet/core/src/hooks/useFacetMemo.ts +++ b/packages/@react-facet/core/src/hooks/useFacetMemo.ts @@ -16,7 +16,7 @@ import { EqualityCheck, Facet, NoValue, ExtractFacetValues } from '../types' * * @returns a new facet definition that can be consumed as a regular facet */ -export function useFacetMemo[], T extends [...Y]>( +export function useFacetMemo, ...Facet[]], T extends [...Y]>( selector: (...args: ExtractFacetValues) => M | NoValue, dependencies: unknown[], facets: T,