-
-
Notifications
You must be signed in to change notification settings - Fork 134
Closed
Description
The two definitions
reactuse/packages/core/src/useMap/interface.ts
Lines 26 to 33 in 77cbe7c
| export type UseMap<K = any, V = any> = ( | |
| /** | |
| * @zh 初始值,可以为 Map 实例、数组或者一个初始化的函数 | |
| * @zh-Hant 初始值,可以為 Map 實例、數組或者一個初始化的函數 | |
| * @en The initial value of the map. It can be a Map instance, an array of key-value pairs, or a function that returns initial entries. | |
| */ | |
| initialValue?: Map<K, V> | readonly (readonly [K, V])[] | (() => Map<K, V> | readonly (readonly [K, V])[]) | |
| ) => { |
reactuse/packages/core/src/useMap/index.ts
Lines 5 to 7 in 77cbe7c
| export const useMap: UseMap = <K, V>( | |
| initialValue?: Map<K, V> | readonly (readonly [K, V])[] | (() => Map<K, V> | readonly (readonly [K, V])[]), | |
| ) => { |
made useMap function having type UseMap<any, any>:
Also, the function useMap does not accept type parameters, making it impossible to specify the concrete type.

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels