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

Conversation

ExE-Boss
Copy link
Contributor

TypeScript PR: microsoft/TypeScript#36408

Reflect.decorate is not on a standards track and has no active proposal being championed in TC39.
We have no idea if Reflect.decorate will get added to the language, even if it does, we have no guarantee it will be the implementation we are assuming it to be.

By having this condition in the code, we are likely preventing Reflect.decorate from ever existing in the language, just like Array.prototype.flatten had to get a different name because MooTools would attempt to use it if it existed and it was not the implementation MooTools assumed it would be.

Here is a W3C TAG finding which recommends against usage of speculative features -- https://www.w3.org/2001/tag/doc/polyfills/#don-t-use-speculative-polyfills-that-defer-to-native-implementations

@JakeChampion
Copy link

Nice work @ExE-Boss ☺️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

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