Skip to content
Merged
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/use-counter-optional-options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'react-simplikit': patch
---

The JSDoc of `useCounter` now marks `options` as optional, matching its `= {}` default, so the generated API pages and the agent skill no longer list it as required.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Optionally, you can provide minimum and maximum values to constrain the counter'
```ts
function useCounter(
initialValue: number = 0,
options: UseCounterOptions
options?: UseCounterOptions
): UseCounterReturn;
```

Expand All @@ -21,7 +21,6 @@ function useCounter(
/>

<Interface
required
name="options"
type="UseCounterOptions"
description="The options for the counter."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Opcionalmente, puedes proporcionar valores mínimo y máximo para limitar el ran
```ts
function useCounter(
initialValue: number = 0,
options: UseCounterOptions
options?: UseCounterOptions
): UseCounterReturn;
```

Expand All @@ -21,7 +21,6 @@ function useCounter(
/>

<Interface
required
name="options"
type="UseCounterOptions"
description="Las opciones del contador."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
```ts
function useCounter(
initialValue: number = 0,
options: UseCounterOptions
options?: UseCounterOptions
): UseCounterReturn;
```

Expand All @@ -21,7 +21,6 @@ function useCounter(
/>

<Interface
required
name="options"
type="UseCounterOptions"
description="カウンターのオプション。"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
```ts
function useCounter(
initialValue: number = 0,
options: UseCounterOptions
options?: UseCounterOptions
): UseCounterReturn;
```

Expand All @@ -20,7 +20,6 @@ function useCounter(
/>

<Interface
required
name="options"
type="UseCounterOptions"
description="카운터의 옵션이에요."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Optionally, you can provide minimum and maximum values to constrain the counter'
```ts
function useCounter(
initialValue: number = 0,
options: UseCounterOptions
options?: UseCounterOptions
): UseCounterReturn;
```

Expand All @@ -21,7 +21,6 @@ function useCounter(
/>

<Interface
required
name="options"
type="UseCounterOptions"
description="The options for the counter."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const validateValue = (value: number, { min, max }: Omit<UseCounterOptions, 'ste
* Optionally, you can provide minimum and maximum values to constrain the counter's range.
*
* @param {number} [initialValue=0] - Initial value for the counter. Defaults to 0.
* @param {UseCounterOptions} options - The options for the counter.
* @param {UseCounterOptions} [options] - The options for the counter.
* @param {number} [options.min] - Minimum value the counter can reach. If not provided, there is no lower limit.
* @param {number} [options.max] - Maximum value the counter can reach. If not provided, there is no upper limit.
* @param {number} [options.step=1] - Value to increment or decrement by. Defaults to 1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
```ts
function useCounter(
initialValue: number = 0,
options: UseCounterOptions
options?: UseCounterOptions
): UseCounterReturn;
```

Expand All @@ -20,7 +20,6 @@ function useCounter(
/>

<Interface
required
name="options"
type="UseCounterOptions"
description="计数器的选项。"
Expand Down
Loading