docs(isUndefined): Polish document styles and fix incorrect comments (#67)

* docs: add inline code markdown

* fix: change to undefined[] annotation

* Revert "fix: change to undefined[] annotation"

This reverts commit 3b81b8fb8a.

* chore: recommit
This commit is contained in:
jgjgill 2024-06-17 12:26:32 +09:00 committed by GitHub
parent 229bf9bd43
commit 2df38fe4e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 7 deletions

View File

@ -1,6 +1,6 @@
# isUndefined
주어진 값이 undefined인지 확인해요.
주어진 값이 `undefined`인지 확인해요.
이 함수는 주어진 값이 `undefined` 인지 엄격 일치 (===) 기준으로 확인합니다.
값이 `undefined` 이면 `true`, 아니면 `false` 를 반환해요.
@ -15,11 +15,11 @@ function isUndefined(x: unknown): x is undefined;
### 파라미터
- `x` (`unknown`): undefined인지 확인할 값
- `x` (`unknown`): `undefined`인지 확인할 값
### 반환 값
(`x is undefined`): 값이 undefined이면 true, 아니면 false.
(`x is undefined`): 값이 `undefined`이면 `true`, 아니면 `false`.
## 예시

View File

@ -1,6 +1,6 @@
# isUndefined
Checks if the given value is undefined.
Checks if the given value is `undefined`.
This function tests whether the provided value is strictly equal to `undefined`.
It returns `true` if the value is `undefined`, and `false` otherwise.
@ -15,11 +15,11 @@ function isUndefined(x: unknown): x is undefined;
### Parameters
- `x` (`unknown`): The value to test if it is undefined.
- `x` (`unknown`): The value to test if it is `undefined`.
### Returns
(`x is undefined`): True if the value is undefined, false otherwise.
(`x is undefined`): `true` if the value is `undefined`, `false` otherwise.
## Examples

View File

@ -17,7 +17,7 @@ describe('isUndefined', () => {
const result = arr.filter(isUndefined);
// Here the type of result should be `null[]`.
// Here the type of result should be `undefined[]`.
expect(result).toStrictEqual([undefined]);
});
});