Skip to content

Commit 9980a38

Browse files
Copilotdayongkr
andauthored
Fix inconsistent return type documentation for predicate functions (toss#1540)
* Initial plan * Fix predicate function return type documentation for consistency Change Returns section from type predicate syntax (e.g., `value is string`) to `boolean` for all predicate functions across all 4 languages (en, ko, ja, zh_hans). Co-authored-by: dayongkr <[email protected]> * Revert incorrect changes, only fix isLength.md return type mismatch Reverts changes that incorrectly changed type predicate returns to boolean. Only isLength needs to have boolean return type (matching source code). Other predicate functions should keep their type predicate returns. Co-authored-by: dayongkr <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: dayongkr <[email protected]>
1 parent eb9e939 commit 9980a38

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

docs/ja/reference/predicate/isLength.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ function processLength(value: unknown) {
4545

4646
#### 戻り値
4747

48-
(`value is number`): 値が有効な長さの場合は `true`、そうでなければ `false` を返します。
48+
(`boolean`): 値が有効な長さの場合は `true`、そうでなければ `false` を返します。

docs/ko/reference/predicate/isLength.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ function processLength(value: unknown) {
4545

4646
#### 반환 값
4747

48-
(`value is number`): 값이 유효한 길이면 `true`, 그렇지 않으면 `false`를 반환해요.
48+
(`boolean`): 값이 유효한 길이면 `true`, 그렇지 않으면 `false`를 반환해요.

docs/reference/predicate/isLength.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ function processLength(value: unknown) {
4545

4646
#### Returns
4747

48-
(`value is number`): Returns `true` if the value is a valid length, `false` otherwise.
48+
(`boolean`): Returns `true` if the value is a valid length, `false` otherwise.

docs/zh_hans/reference/predicate/isLength.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ function processLength(value: unknown) {
4545

4646
#### 返回值
4747

48-
(`value is number`): 如果值为有效长度则返回 `true`,否则返回 `false`
48+
(`boolean`): 如果值为有效长度则返回 `true`,否则返回 `false`

0 commit comments

Comments
 (0)