diff --git a/src/factory/createGlobalState.ts b/src/factory/createGlobalState.ts index 8c458bb1..c06ba9a0 100644 --- a/src/factory/createGlobalState.ts +++ b/src/factory/createGlobalState.ts @@ -1,10 +1,10 @@ import { useState } from 'react'; -import { resolveHookState, IHookStateSetAction } from '../misc/hookState'; +import { IHookStateInitAction, IHookStateSetAction, resolveHookState } from '../misc/hookState'; import useEffectOnce from '../useEffectOnce'; import useIsomorphicLayoutEffect from '../useIsomorphicLayoutEffect'; export function createGlobalState( - initialState: S | (() => S) + initialState: IHookStateInitAction ): () => [S, (state: IHookStateSetAction) => void]; export function createGlobalState(): () => [ S,