Index: es2022.object.d.ts
===================================================================
--- es2022.object.d.ts
+++ es2022.object.d.ts
@@ -3,6 +3,20 @@
* Determines whether an object has a property with the specified name.
* @param o An object.
* @param v A property name.
*/
- hasOwn(o: object, v: PropertyKey): boolean;
+ hasOwn<Obj extends object, Key extends PropertyKey>(
+ o: Obj,
+ v: Key,
+ ): o is Obj &
+ (string extends Key
+ ? {}
+ : number extends Key
+ ? {}
+ : symbol extends Key
+ ? {}
+ : Key extends PropertyKey
+ ? {
+ [key in Key]: unknown;
+ }
+ : {});
}