Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/usemap-optional-initial-state.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'react-simplikit': patch
---

Mark `useMap`'s `initialState` parameter as optional in the JSDoc and documentation, matching its existing default of `new Map()`.
5 changes: 3 additions & 2 deletions packages/plugin/skills/react-simplikit/references/useMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ Provides efficient state management and stable action functions.
## Interface

```ts
function useMap<K, V>(initialState: MapOrEntries<K, V>): UseMapReturn<K, V>;
function useMap<K, V>(
initialState: MapOrEntries<K, V> = new Map()
): UseMapReturn<K, V>;
```

### Parameters

<Interface
required
name="initialState"
type="MapOrEntries<K, V>"
description="Initial Map state (Map object or array of key-value pairs)"
Expand Down
5 changes: 3 additions & 2 deletions packages/react-simplikit/src/hooks/useMap/es/useMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ Proporciona una gestión eficiente del estado y funciones de acción estables.
## Interfaz

```ts
function useMap<K, V>(initialState: MapOrEntries<K, V>): UseMapReturn<K, V>;
function useMap<K, V>(
initialState: MapOrEntries<K, V> = new Map()
): UseMapReturn<K, V>;
```

### Parámetros

<Interface
required
name="initialState"
type="MapOrEntries<K, V>"
description="Estado inicial del Map (objeto Map o arreglo de pares clave-valor)"
Expand Down
5 changes: 3 additions & 2 deletions packages/react-simplikit/src/hooks/useMap/ja/useMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
## インターフェース

```ts
function useMap<K, V>(initialState: MapOrEntries<K, V>): UseMapReturn<K, V>;
function useMap<K, V>(
initialState: MapOrEntries<K, V> = new Map()
): UseMapReturn<K, V>;
```

### パラメータ

<Interface
required
name="initialState"
type="MapOrEntries<K, V>"
description="Map の初期状態(Map オブジェクトまたはキーと値のペアの配列)です。"
Expand Down
5 changes: 3 additions & 2 deletions packages/react-simplikit/src/hooks/useMap/ko/useMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
## 인터페이스

```ts
function useMap<K, V>(initialState: MapOrEntries<K, V>): UseMapReturn<K, V>;
function useMap<K, V>(
initialState: MapOrEntries<K, V> = new Map()
): UseMapReturn<K, V>;
```

### 파라미터

<Interface
required
name="initialState"
type="MapOrEntries<K, V>"
description="초기 맵 상태 (맵 객체 또는 키-값 쌍의 배열)"
Expand Down
5 changes: 3 additions & 2 deletions packages/react-simplikit/src/hooks/useMap/useMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ Provides efficient state management and stable action functions.
## Interface

```ts
function useMap<K, V>(initialState: MapOrEntries<K, V>): UseMapReturn<K, V>;
function useMap<K, V>(
initialState: MapOrEntries<K, V> = new Map()
): UseMapReturn<K, V>;
```

### Parameters

<Interface
required
name="initialState"
type="MapOrEntries<K, V>"
description="Initial Map state (Map object or array of key-value pairs)"
Expand Down
2 changes: 1 addition & 1 deletion packages/react-simplikit/src/hooks/useMap/useMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type UseMapReturn<K, V> = [Omit<Map<K, V>, 'set' | 'clear' | 'delete'>, MapActio
*
* @template K - The type of the Map keys.
* @template V - The type of the Map values.
* @param {MapOrEntries<K, V>} initialState - Initial Map state (Map object or array of key-value pairs)
* @param {MapOrEntries<K, V>} [initialState=new Map()] - Initial Map state (Map object or array of key-value pairs)
* @returns {UseMapReturn<K, V>} A tuple containing the Map state and actions to manipulate it
*
* @example
Expand Down
5 changes: 3 additions & 2 deletions packages/react-simplikit/src/hooks/useMap/zh-Hans/useMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
## 接口

```ts
function useMap<K, V>(initialState: MapOrEntries<K, V>): UseMapReturn<K, V>;
function useMap<K, V>(
initialState: MapOrEntries<K, V> = new Map()
): UseMapReturn<K, V>;
```

### 参数

<Interface
required
name="initialState"
type="MapOrEntries<K, V>"
description="初始 Map 状态(Map 对象或键值对数组)"
Expand Down
Loading