Set a type guard for hasOwnProperty signature. #18282
Labels
Declined
The issue was declined as something which matches the TypeScript vision
Domain: lib.d.ts
The issue relates to the different libraries shipped with TypeScript
Suggestion
An idea for TypeScript
TypeScript Version: 2.5.0-dev.20170629
Watch this code with a new version of hasOwnProperty:
Suggestion:
Change the actual declaration of
hasOwnProperty
:With a new one type guarded:
Something that also could be added is a type guard to
in
operator to work as the type guard of the suggestedhasOwnProperty
.The text was updated successfully, but these errors were encountered: