Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit de313ff

Browse filesBrowse files
avchugaevmhegazy
authored andcommitted
Object.getOwnPropertyDescriptor() returns 'undefined' if property descriptor not found. (microsoft#18148)
1 parent c1f2afd commit de313ff
Copy full SHA for de313ff

3 files changed

+3-3Lines changed: 3 additions & 3 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/lib/es2015.core.d.ts‎

Copy file name to clipboardExpand all lines: src/lib/es2015.core.d.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ interface ObjectConstructor {
327327
* @param o Object that contains the property.
328328
* @param p Name of the property.
329329
*/
330-
getOwnPropertyDescriptor(o: any, propertyKey: PropertyKey): PropertyDescriptor;
330+
getOwnPropertyDescriptor(o: any, propertyKey: PropertyKey): PropertyDescriptor | undefined;
331331

332332
/**
333333
* Adds a property to an object, or modifies attributes of an existing property.
Collapse file

‎src/lib/es2015.reflect.d.ts‎

Copy file name to clipboardExpand all lines: src/lib/es2015.reflect.d.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ declare namespace Reflect {
44
function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;
55
function deleteProperty(target: object, propertyKey: PropertyKey): boolean;
66
function get(target: object, propertyKey: PropertyKey, receiver?: any): any;
7-
function getOwnPropertyDescriptor(target: object, propertyKey: PropertyKey): PropertyDescriptor;
7+
function getOwnPropertyDescriptor(target: object, propertyKey: PropertyKey): PropertyDescriptor | undefined;
88
function getPrototypeOf(target: object): object;
99
function has(target: object, propertyKey: PropertyKey): boolean;
1010
function isExtensible(target: object): boolean;
Collapse file

‎src/lib/es5.d.ts‎

Copy file name to clipboardExpand all lines: src/lib/es5.d.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ interface ObjectConstructor {
127127
* @param o Object that contains the property.
128128
* @param p Name of the property.
129129
*/
130-
getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor;
130+
getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor | undefined;
131131

132132
/**
133133
* Returns the names of the own properties of an object. The own properties of an object are those that are defined directly

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.