Skip to content

Fix Reflect has method signature(s) per issue #10949 initial report#10962

Merged
mhegazy merged 1 commit into
masterfrom
unknown repository
Sep 19, 2016
Merged

Fix Reflect has method signature(s) per issue #10949 initial report#10962
mhegazy merged 1 commit into
masterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Sep 17, 2016

Fixes #10949 As per fix initially proposed when issue was created. We just delete the two 'has' methods and replace with a single 'has' method with the signature fixed with 'PropertyKey' annotation.
This brings Reflect into sync with Proxy handler methods noting that all the other methods in Reflect which accept a 'propKey' argument are already annotated with 'PropertyKey' type.

Note that ECMA-262 7th Edition has removed the 'enumerate' method from Reflect altogether yet it remains in es2015.proxy.d.ts. Whether this should be removed or not to bring 'ProxyHandler' into line with the 7th Edition or not I do not know. I don't otherwise know of any means of marking a method as "deprecated" in TypeScript (but perhaps there is?).

@ghost
Copy link
Copy Markdown
Author

ghost commented Sep 17, 2016

btw. I didn't push up the corresponding built lib file lib/lib.es2015.reflect.d.ts as wasn't sure whether to or not especially as it is generated in the compile process (and didn't seem to be the right thing to do). Just kept it simple for your merge as you will be recompiling anyway.

@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented Sep 19, 2016

I didn't push up the corresponding built lib file lib/lib.es2015.reflect.d.ts as wasn't sure whether to or not especially as it is generated in the compile process.

thanks!

@mhegazy mhegazy merged commit b7d1d11 into microsoft:master Sep 19, 2016
@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented Sep 19, 2016

Thanks!

@ghost ghost deleted the Fix10949 branch September 20, 2016 00:19
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 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.

Error TS2345 due to type definition for ES2015 Reflect being out of sync with Proxy

1 participant