Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for IsArray #27

Closed
haejunejung opened this issue Aug 24, 2024 · 0 comments · Fixed by #33
Closed

Support for IsArray #27

haejunejung opened this issue Aug 24, 2024 · 0 comments · Fixed by #33

Comments

@haejunejung
Copy link
Owner

It provides support for IsArray.

It allows you to accurately determine if a type is an array or not. This helps in distinguish between array and non-array types. By ensuring that a type is an array before performing operations, It helps prevent runtime erros and enhances code reliability.

For example as below.

type T0 = IsArray<[]> // true
type T1 = IsArray<readonly []> // true
type T2 = IsArray<number[]> // true

type T3 = IsArray<{}> // false
type T4 = IsArray<Record<number, any>> // false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant