Repository navigation
Support es7 exponation operator #2102
Description
Activity
- addedSuggestionAn idea for TypeScriptAn idea for TypeScriptIn DiscussionNot yet reached consensusNot yet reached consensusES7Relates to the ES7 SpecRelates to the ES7 Spec
on Feb 23, 2015 RyanCavanaugh commented
on Feb 23, 2015 MemberMore actionsCreating an
ES7label 😄What happens if
Mathis shadowed in the current scope? Error?fdecampredon commented
on Feb 23, 2015 AuthorMore actionsWhat happens if Math is shadowed in the current scope? Error?
I guess, a more sophisticated solution could be to capture
powin some way beforeMathgets shadowed but it's not really necessary in my opinion. ShadowingMathis not so common....What happens if Math is shadowed in the current scope
error 👍
DanielRosenwasser commented
on Feb 23, 2015 MemberMore actionsI'm sure we could just perform some appropriate tests to see if
Math.powis working correctly. (Note: this is a joke)error 👍
That's a rather untraditional direction to take. We don't currently take that approach with
Stringin certain places where it might be more convenient or efficient to do so. On the other hand, I think the alternative would be__exponentiate,__exp, or__pow.fdecampredon commented
on Feb 23, 2015 AuthorMore actionsDaniel Rosenwasser (@DanielRosenwasser) you want to check if
Math.powreturn a fine result ifMathhas been shadowed ?DanielRosenwasser commented
on Feb 23, 2015 MemberMore actionsSorry, you'll have to forgive me, that was a joke. I've amended my comment to clarify it.
fdecampredon commented
on Feb 23, 2015 AuthorMore actionsNo that's me sorry, since my english is far from being perfect I often fail to understand what is a joke in some context ^^.
We obviously want/will support this when the time comes but given how early it is in ES7's development process we'd rather close this and wait on locking down exactly what ES7 is doing. As we've always said, ending up misaligned with a future ES version is our worst case scenario. Although it may be quite likely this ends up in ES7 as currently spec'd the risk of that not being the case isn't enough to add this to TypeScript today given the relatively low value of this operator.
- addedDeclinedThe issue was declined as something which matches the TypeScript visionThe issue was declined as something which matches the TypeScript visionand removedIn DiscussionNot yet reached consensusNot yet reached consensus
on Apr 21, 2015 RyanCavanaugh commented
on Apr 21, 2015 MemberMore actionsOnce ES7 decides the exact syntax here (I could see
^^or**happening) and whether or not it's exactly equivalent toMath.pow, we can revisit this to see about downlevel emit.- locked and limited conversation to collaborators
on Jun 18, 2018
https://github.com/rwaldron/exponentiation-operator I don't think it needs proposal.
Few emitting examples :