mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
getOwnPropertyDescriptor return should allow undefined
getOwnPropertyDescriptor _should_ return undefined in certain situations. This is documented here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/getOwnPropertyDescriptor This change addresses https://github.com/Microsoft/TypeScript/issues/14923 and https://github.com/Microsoft/TypeScript/issues/10904. The original fix to 14923 was to the /lib/lib.es2015.proxy.d.ts file instead of /src/lib/lib.es2015.proxy.d.ts (see: https://github.com/Microsoft/TypeScript/pull/10550/commits). I think this meant that the change got over-written by a generation script (see note here: https://github.com/Microsoft/TypeScript/tree/master/lib)
This commit is contained in:
parent
9a62db2b5c
commit
ccec13aaf1
2
src/lib/es2015.proxy.d.ts
vendored
2
src/lib/es2015.proxy.d.ts
vendored
@ -3,7 +3,7 @@ interface ProxyHandler<T> {
|
||||
setPrototypeOf? (target: T, v: any): boolean;
|
||||
isExtensible? (target: T): boolean;
|
||||
preventExtensions? (target: T): boolean;
|
||||
getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor;
|
||||
getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor | undefined;
|
||||
has? (target: T, p: PropertyKey): boolean;
|
||||
get? (target: T, p: PropertyKey, receiver: any): any;
|
||||
set? (target: T, p: PropertyKey, value: any, receiver: any): boolean;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user