fix: add this type for Reflect.defineProperty (#33544)

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
This commit is contained in:
PaulHan
2022-03-04 03:01:12 +08:00
committed by GitHub
parent 112dd24ede
commit 0a24dee97d

View File

@@ -24,7 +24,7 @@ declare namespace Reflect {
* @param propertyKey The property name.
* @param attributes Descriptor for the property. It can be for a data property or an accessor property.
*/
function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;
function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType<any>): boolean;
/**
* Removes a property from an object, equivalent to `delete target[propertyKey]`,