diff --git a/src/index.ts b/src/index.ts index 1d051bc..6110e7b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,15 +1,15 @@ import { useState, useEffect, Dispatch, SetStateAction } from 'react'; -function useLocalStorage( +function useStoreState( _key: string, _initialValue: T | (() => T) ): [T, Dispatch>]; -function useLocalStorage( +function useStoreState( _key: string ): [T | undefined, Dispatch>]; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types -function useLocalStorage( +function useStoreState( key: string, initialValue?: T | (() => T) ) { @@ -42,4 +42,4 @@ function useLocalStorage( return [value, setValue] as const; } -export default useLocalStorage; +export default useStoreState;