sindresorhus / is

Type check values
MIT License
1.68k stars 109 forks source link

Property 'function' does not exist on type 'typeof is'. #157

Closed lekterable closed 2 years ago

lekterable commented 2 years ago

Hi,

I'm trying to check if a given value is a function, but I'm getting the following error:

Screenshot 2022-02-01 at 00 25 02

Using the is.function_ does work, but if this is expected I think we should update the README which also uses the function instead of function_: https://github.com/sindresorhus/is#functionvalue

Similarly with other types like null_ or class_.

sindresorhus commented 2 years ago

It's a TS limitation only. I have documented it better now: https://github.com/sindresorhus/is/commit/04ccf21dba99e9c07c41a38bcf3e4881c06b1bac