Skip to content

Commit 6939b5e

Browse files
wo-o29raon0211
andauthored
docs: standardize interfaces, parameter names, and types in function docs (#1367)
* docs(meanBy): unify parameter names and types across function documentation for clarity and consistency * docs(unionWith): unify parameter names and types across function documentation for clarity and consistency * docs(uniqWith): unify parameter names and types across function documentation for clarity and consistency * docs(sortedIndexBy): unify parameter names and types across function documentation for clarity and consistency * docs(overEvery): unify parameter names and types across function documentation for clarity and consistency * docs(isEqualWith): unify parameter names and types across function documentation for clarity and consistency * docs(property): unify parameter names and types across function documentation for clarity and consistency * docs(matchesProperty): unify parameter names and types across function documentation for clarity and consistency * docs(get): unify parameter names and types across function documentation for clarity and consistency --------- Co-authored-by: Sojin Park <[email protected]>
1 parent 48295ba commit 6939b5e

File tree

34 files changed

+74
-58
lines changed

34 files changed

+74
-58
lines changed

docs/ja/reference/array/unionWith.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function unionWith<T>(arr1: T[], arr2: T[], areItemsEqual: (item1: T, item2: T)
1515

1616
- `arr1` (`T[]`): 比較する最初の配列。
1717
- `arr2` (`T[]`): 比較する2番目の配列。
18-
- `areItemsEqual` (`(x: T, y: T) => boolean`): 2つの要素が一致するかどうかを判断する一致関数です。2つの要素が一致する場合は `true` を、一致しない場合は `false` を返すようにしてください。
18+
- `areItemsEqual` (`(item1: T, item2: T) => boolean`): 2つの要素が一致するかどうかを判断する一致関数です。2つの要素が一致する場合は `true` を、一致しない場合は `false` を返すようにしてください。
1919

2020
### 戻り値
2121

docs/ja/reference/array/uniqWith.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function uniqWith<T>(arr: T[], areItemsEqual: (item1: T, item2: T) => boolean):
1111
### パラメータ
1212

1313
- `arr` (`T[]`): 重複を除去する配列。
14-
- `areItemsEqual` (`(x: T, y: T) => boolean`): 2つの要素が一致するかどうかを判断する一致関数です。2つの要素が一致する場合は `true` を、一致しない場合は `false` を返すようにしてください。
14+
- `areItemsEqual` (`(item1: T, item2: T) => boolean`): 2つの要素が一致するかどうかを判断する一致関数です。2つの要素が一致する場合は `true` を、一致しない場合は `false` を返すようにしてください。
1515

1616
### 戻り値
1717

docs/ja/reference/compat/array/sortedIndexBy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
function sortedIndexBy<T, R>(
1919
array: ArrayLike<T> | null | undefined,
2020
value: T,
21-
iteratee: (value: T) => R,
21+
iteratee: (item: T) => R,
2222
retHighest?: boolean
2323
): number;
2424
```

docs/ja/reference/compat/object/get.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ function get<T, P extends string, D = Get<T, P>>(
8282
): Exclude<Get<T, P>, null | undefined> | D;
8383

8484
function get(object: unknown, path: PropertyKey, defaultValue?: unknown): any;
85-
function get(object: unknown, path: PropertyKey | PropertyKey[], defaultValue?: unknown): any;
85+
function get(object: unknown, path: PropertyKey | readonly PropertyKey[], defaultValue?: unknown): any;
8686
```
8787

8888
### パラメータ
8989

90-
- `obj` (`object`): 検索対象のオブジェクト。
91-
- `path` (`string` または `number` または `symbol` または `Array<string | number | symbol>`): プロパティを取得するパス。
90+
- `object` (`unknown`): 検索対象のオブジェクト。
91+
- `path` (`PropertyKey | readonly PropertyKey[]`): プロパティを取得するパス。
9292
- `defaultValue` (`unknown`): 見つかった値が `undefined` の場合に返す値。
9393

9494
### 戻り値

docs/ja/reference/compat/object/property.md

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

1313
```typescript
14-
function property<T, R>(path: PropertyKey | PropertyKey[]): (object: T) => R;
14+
function property<T, R>(path: PropertyKey | readonly PropertyKey[]): (object: T) => R;
1515
```
1616

1717
### パラメータ
1818

19-
- `path` (`PropertyKey | PropertyKey[]`): プロパティを取得するパス。
19+
- `path` (`PropertyKey | readonly PropertyKey[]`): プロパティを取得するパス。
2020

2121
### 戻り値
2222

docs/ja/reference/compat/predicate/matchesProperty.md

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

1515
```typescript
16-
function matchesProperty(property: PropertyKey | PropertyKey[], source: unknown): (target?: unknown) => boolean;
16+
function matchesProperty(
17+
property: PropertyKey | readonly PropertyKey[],
18+
source: unknown
19+
): (target?: unknown) => boolean;
1720
```
1821

1922
### パラメータ
2023

21-
- `property` (`number | string | symbol | Array<number | string | symbol>`): オブジェクトのプロパティを表すパス。プロパティ名、プロパティ名の配列、または深いパスを表す文字列を使用できます。
24+
- `property` (`PropertyKey | readonly PropertyKey[]`): オブジェクトのプロパティを表すパス。プロパティ名、プロパティ名の配列、または深いパスを表す文字列を使用できます。
2225
- `source` (`unknown`): オブジェクトのプロパティと比較する値。
2326

2427
### 戻り値

docs/ja/reference/compat/util/overEvery.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ function overEvery<T, U extends T, V extends T>(
1919
predicate2: (value: T) => value is V
2020
): (value: T) => value is U & V;
2121
function overEvery<T>(
22-
...predicates: Array<((...args: T[]) => boolean) | ReadonlyArray<(...args: T[]) => boolean>>
23-
): (...args: T[]) => boolean;
22+
...predicates: Array<((...values: T[]) => boolean) | ReadonlyArray<(...values: T[]) => boolean>>
23+
): (...values: T[]) => boolean;
2424
```
2525

2626
### パラメータ

docs/ja/reference/math/meanBy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
## インターフェース
88

99
```typescript
10-
function meanBy<T>(items: T[], getValue: (element: T) => number): number;
10+
function meanBy<T>(items: T[], getValue: (item: T) => number): number;
1111
```
1212

1313
### パラメータ

docs/ja/reference/predicate/isEqualWith.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ function isEqualWith(
2929

3030
### パラメータ
3131

32-
- `a` (`unknown`): 比較する最初の値。
33-
- `b` (`unknown`): 比較する2番目の値。
32+
- `a` (`any`): 比較する最初の値。
33+
- `b` (`any`): 比較する2番目の値。
3434
- `areValuesEqual` (`(x: any, y: any, property?: PropertyKey, xParent?: any, yParent?: any, stack?: Map<any, any>) => boolean | void`): 2つの値を比較する方法を示す比較関数。2つの値が等しいかどうかを示すブール値を返すことができます。`undefined`を返すと、デフォルトの方法で2つの値を比較します。
3535
- `x`: 最初のオブジェクト `a` に属する値。
3636
- `y`: 2番目のオブジェクト `b` に属する値。

docs/ko/reference/array/unionWith.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function unionWith<T>(arr1: T[], arr2: T[], areItemsEqual: (item1: T, item2: T)
1515

1616
- `arr1` (`T[]`): 비교할 첫 번째 배열.
1717
- `arr2` (`T[]`): 비교할 두 번째 배열.
18-
- `areItemsEqual` (`(x: T, y: T) => boolean`): 두 요소가 일치하는지 판단하는 일치 함수예요. 두 요소가 일치한다면 `true`를, 일치하지 않는다면 `false`를 반환하게 해주세요.
18+
- `areItemsEqual` (`(item1: T, item2: T) => boolean`): 두 요소가 일치하는지 판단하는 일치 함수예요. 두 요소가 일치한다면 `true`를, 일치하지 않는다면 `false`를 반환하게 해주세요.
1919

2020
### 반환 값
2121

0 commit comments

Comments
 (0)