Skip to content

getOwnPropertyDescriptor return should allow undefined#15694

Merged
mhegazy merged 1 commit into
microsoft:masterfrom
astegmaier:patch-1
May 9, 2017
Merged

getOwnPropertyDescriptor return should allow undefined#15694
mhegazy merged 1 commit into
microsoft:masterfrom
astegmaier:patch-1

Conversation

@astegmaier

@astegmaier astegmaier commented May 9, 2017

Copy link
Copy Markdown
Contributor

Fixes #10904 (marked as "Accepting PRs", then fixed, then regressed) and #14923 (remarking on the regression)

getOwnPropertyDescriptor should return undefined in certain situations. This is documented here.

The original fix to 10904 was to the /lib/lib.es2015.proxy.d.ts file instead of /src/lib/lib.es2015.proxy.d.ts. I think this meant that the change got over-written by a generation script that ran as part of a later commit (see note here).

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 #14923 and #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)
@msftclas

msftclas commented May 9, 2017

Copy link
Copy Markdown

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@mhegazy mhegazy merged commit 888e264 into microsoft:master May 9, 2017
@mhegazy

mhegazy commented May 9, 2017

Copy link
Copy Markdown
Contributor

The previous fix in #10550 was done to an auto-generated file, and not the source. sorry for not catching this in the earlier change. this one should not go anywhere :).

@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow undefined from ProxyHandler<T>.getOwnPropertyDescriptor

3 participants