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

isEmpty should probably be usable as type-guard against null, undefined, and Record<PropertyKey, never> #422

Open
matthew-holder-revvity opened this issue Aug 19, 2024 · 0 comments

Comments

@matthew-holder-revvity
Copy link

Since isEmpty checks for the nullish values, maybe it should return a value is predicate that identifies it as one of the nullish values or the empty object type (a la how it's defined in @types/lodash). (see: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/lodash/common/lang.d.ts at line 574)

@matthew-holder-revvity matthew-holder-revvity changed the title isEmpty should probably usable as type-guard against null, undefined, and Record<PropertyKey, never> isEmpty should probably be usable as type-guard against null, undefined, and Record<PropertyKey, never> Aug 19, 2024
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

No branches or pull requests

1 participant