You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using Record<string, never> to represent {} but wanted to migrate to TypeFest's EmptyObject
I've been using Object.keys(foo).length === 0 to detect the empty object type but that does not work for EmptyObject. Is there a way to check for it without typecasting or creating custom typeguard?
I wonder how you guys do it.
I've been using
Record<string, never>
to represent{}
but wanted to migrate to TypeFest'sEmptyObject
I've been using
Object.keys(foo).length === 0
to detect the empty object type but that does not work forEmptyObject
. Is there a way to check for it without typecasting or creating custom typeguard?Upvote & Fund
The text was updated successfully, but these errors were encountered: