docs(isArray): Update docs for isArray (#390)
Some checks are pending
CI / codecov (push) Waiting to run
Release / release (push) Waiting to run

This commit is contained in:
Dongho Kim 2024-08-18 22:51:39 +09:00 committed by GitHub
parent 4637a17b53
commit 50814915ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 9 deletions

View File

@ -16,16 +16,16 @@ TypeScript의 타입 가드로 주로 사용되는데요, 파라미터로 주어
## 인터페이스 ## 인터페이스
```typescript ```typescript
function isArray<T>(value: T): value is Extract<T, unknown[]>; function isArray(value?: unknown): value is any[];
``` ```
### 파라미터 ### 파라미터
- `value` (`T`): 배열인지 확인할 값. - `value` (`unknown`): 배열인지 확인할 값.
### 반환 값 ### 반환 값
(`value is Extract<T, unknown[]>`): 값이 배열이면 `true`, 아니면 `false`. (`value is any[]`): 값이 배열이면 `true`, 아니면 `false`.
## 예시 ## 예시

View File

@ -16,16 +16,16 @@ This function can also serve as a type predicate in TypeScript, narrowing the ty
## Signature ## Signature
```typescript ```typescript
function isArray<T>(value: T): value is Extract<T, unknown[]>; function isArray(value?: unknown): value is any[];
``` ```
### Parameters ### Parameters
- `value` (`T`): The value to test if it is an array. - `value` (`unknown`): The value to test if it is an array.
### Returns ### Returns
(`value is Extract<T, unknown[]>`): `true` if the value is an array, `false` otherwise. (`value is any[]`): `true` if the value is an array, `false` otherwise.
## Examples ## Examples

View File

@ -18,16 +18,16 @@
## 签名 ## 签名
```typescript ```typescript
function isArray<T>(value: T): value is Extract<T, unknown[]>; function isArray(value?: unknown): value is any[];
``` ```
### 参数 ### 参数
- `value` (`T`): 检查是否为数组的值。 - `value` (`unknown`): 检查是否为数组的值。
### 返回值 ### 返回值
(`value is Extract<T, unknown[]>`): 如果值为数组,则返回 `true`,否则返回 `false` (`value is any[]`): 如果值为数组,则返回 `true`,否则返回 `false`
## 示例 ## 示例