sindresorhus / is

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

is.enumCase method is not a type guard #205

Closed vtgn closed 6 months ago

vtgn commented 6 months ago

Hi,

assert.enumCase() is an assert guard but is.enumCase() is not a type guard, contrary to the other methods. Why this choice? This is very disturbing and annoying because it requires more work to manage the type of the value given in argument after the call of is.enumcase(). :/

Regards.

sindresorhus commented 6 months ago

Just an oversight. Fixed in the latest update.

vtgn commented 6 months ago

@sindresorhus My mistake. I searched for an opened or closed issue about it but there was none, and I didn't think to watch the latest code implementation. I will be careful next time.

Thanks. Regards.