Skip to content

Commit b1b7a86

Browse files
authored
docs: update function signatures and parameter types for clarity in multiple documentation files (toss#1369)
1 parent 82fd952 commit b1b7a86

File tree

14 files changed

+34
-22
lines changed

14 files changed

+34
-22
lines changed

docs/ja/reference/array/initial.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
## インターフェース
88

99
```typescript
10+
function initial<T>(arr: [T]): [];
11+
function initial(arr: []): [];
12+
function initial<T, U>(arr: [...T[], U]): T[];
1013
function initial<T>(arr: T[]): T[];
1114
```
1215

docs/ja/reference/function/negate.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
## インターフェース
66

77
```typescript
8-
function negate<F extends (...args: never[]) => boolean>(func: F): F;
8+
function negate<F extends (...args: any[]) => boolean>(func: F): F;
99
```
1010

1111
### パラメータ
1212

13-
- `func` (`F extends (args: ...Parameters) => unknown`): 戻り値を反対に変更する関数。
13+
- `func` (`F extends (...args: any[]) => boolean`): 戻り値を反対に変更する関数。
1414

1515
### 戻り値
1616

docs/ja/reference/function/retry.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ function retry<T>(func: () => Promise<T>, { retries, delay, signal }: RetryOptio
1313
### パラメータ
1414

1515
- `func` (`() => Promise<T>`): `Promise`を返す関数。
16-
- `retries`: 再試行する回数。デフォルトは `Number.POSITIVE_INFINITY` で、成功するまで再試行します。
17-
- `delay`: 再試行の間隔。ミリ秒単位の数値、または現在の試行回数 (`attempts`) を受け取って遅延を動的に決定する関数。デフォルトは `0` です。
18-
- `signal`: 再試行をキャンセルするための `AbortSignal`
16+
- `retries` (`number`): 再試行する回数。デフォルトは `Number.POSITIVE_INFINITY` で、成功するまで再試行します。
17+
- `delay` (`number | ((attempts: number) => number)`): 再試行の間隔。ミリ秒単位の数値、または現在の試行回数 (`attempts`) を受け取って遅延を動的に決定する関数。デフォルトは `0` です。
18+
- `signal` (`AbortSignal`): 再試行をキャンセルするための `AbortSignal`
1919

2020
delay: 再試行の間隔。ミリ秒単位の数値、または現在の試行回数(attempts)を受け取って遅延を動的に決定する関数。デフォルトは 0 です。
2121

docs/ko/reference/array/initial.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
## 인터페이스
88

99
```typescript
10+
function initial<T>(arr: [T]): [];
11+
function initial(arr: []): [];
12+
function initial<T, U>(arr: [...T[], U]): T[];
1013
function initial<T>(arr: T[]): T[];
1114
```
1215

docs/ko/reference/function/negate.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
## 인터페이스
66

77
```typescript
8-
function negate<F extends (...args: never[]) => boolean>(func: F): F;
8+
function negate<F extends (...args: any[]) => boolean>(func: F): F;
99
```
1010

1111
### 파라미터
1212

13-
- `func` (`F extends (args: ...Parameters) => unknown`): 반환 값을 반대로 바꿀 함수.
13+
- `func` (`F extends (...args: any[]) => boolean`): 반환 값을 반대로 바꿀 함수.
1414

1515
### 반환 값
1616

docs/ko/reference/function/retry.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ function retry<T>(func: () => Promise<T>, { retries, delay, signal }: RetryOptio
1313
### 파라미터
1414

1515
- `func` (`() => Promise<T>`): `Promise`를 반환하는 함수.
16-
- `retries`: 재시도할 횟수. 기본값은 `Number.POSITIVE_INFINITY`로, 성공할 때까지 재시도해요.
17-
- `delay`: 재시도 사이 간격. 밀리세컨드(ms) 단위의 숫자이거나, 현재 재시도 횟수(`attempts`)를 기반으로 동적으로 간격을 계산하는 함수일 수 있어요. 기본값은 `0`이에요.
18-
- `signal`: 재시도를 취소할 수 있는 `AbortSignal`.
16+
- `retries` (`number`): 재시도할 횟수. 기본값은 `Number.POSITIVE_INFINITY`로, 성공할 때까지 재시도해요.
17+
- `delay` (`number | ((attempts: number) => number)`): 재시도 사이 간격. 밀리세컨드(ms) 단위의 숫자이거나, 현재 재시도 횟수(`attempts`)를 기반으로 동적으로 간격을 계산하는 함수일 수 있어요. 기본값은 `0`이에요.
18+
- `signal` (`AbortSignal`): 재시도를 취소할 수 있는 `AbortSignal`.
1919

2020
### 반환 값
2121

docs/reference/array/initial.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ For an empty array or an array with a length of 1, it returns an empty array (`[
77
## Signature
88

99
```typescript
10+
function initial<T>(arr: [T]): [];
11+
function initial(arr: []): [];
12+
function initial<T, U>(arr: [...T[], U]): T[];
1013
function initial<T>(arr: T[]): T[];
1114
```
1215

docs/reference/function/identity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Returns the input value unchanged.
55
## Signature
66

77
```typescript
8-
function identity<T>(x: T);
8+
function identity<T>(x: T): T;
99
```
1010

1111
### Parameters

docs/reference/function/negate.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ Creates a function that negates the result of the predicate function.
55
## Signature
66

77
```typescript
8-
function negate<F extends (...args: never[]) => boolean>(func: F): F;
8+
function negate<F extends (...args: any[]) => boolean>(func: F): F;
99
```
1010

1111
### Parameters
1212

13-
- `func` (`F extends (args: ...Parameters) => unknown`): The function to negate.
13+
- `func` (`F extends (...args: any[]) => boolean`): The function to negate.
1414

1515
### Returns
1616

docs/reference/function/retry.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ function retry<T>(func: () => Promise<T>, { retries, delay, signal }: RetryOptio
1313
### Parameters
1414

1515
- `func` (`() => Promise<T>`): A function that returns a `Promise`.
16-
- `retries`: The number of times to retry. The default is `Number.POSITIVE_INFINITY`, which means it will retry until it succeeds.
17-
- `delay`: The interval between retries, measured in milliseconds (ms). or a function that returns a delay based on the current attempt. The default is `0`.
18-
- `signal`: An `AbortSignal` that can be used to cancel the retries.
16+
- `retries` (`number`): The number of times to retry. The default is `Number.POSITIVE_INFINITY`, which means it will retry until it succeeds.
17+
- `delay` (`number | ((attempts: number) => number)`): The interval between retries, measured in milliseconds (ms). or a function that returns a delay based on the current attempt. The default is `0`.
18+
- `signal` (`AbortSignal`): An `AbortSignal` that can be used to cancel the retries.
1919

2020
### Returns
2121

0 commit comments

Comments
 (0)