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 IsFunction #29

Open
haejunejung opened this issue Aug 24, 2024 · 0 comments
Open

Support for IsFunction #29

haejunejung opened this issue Aug 24, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@haejunejung
Copy link
Owner

It provides support for IsFunction.

Functions are distinct from objects, arrays, and tuples. Identifying functions separately allows you to apply function-specific logic or type handling.

For example as below.

type T0 = IsFunction<Function> // true
type T1 = IsFunction<() => void> // true
type T2 = IsFunction<(a: number, b: number) => number> // true

type T4 = IsFunction<[number]> // false
type T5 = IsFunction<{}> // false
type T6 = IsFunction<Record<any, any>> // false
type T7 = IsFunction<[]> // false
@haejunejung haejunejung added the enhancement New feature or request label Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant