Repository navigation
Support 'throw' expressions #18535
Description
Activity
Just to note, Ron Buckton (@rbuckton) is closely aligned to the TypeScript team. I highly suspect this proposal would be implemented when everyone is comfortable it is in a stable enough position.
Reacted by Aluan Haddad and Sean M. VieiraKitson Kelly (@kitsonk) That make sense.
So is this proposal premature?- addedES NextNew featurers for ECMAScript (a.k.a. ESNext)New featurers for ECMAScript (a.k.a. ESNext)SuggestionAn idea for TypeScriptAn idea for TypeScript
on Sep 17, 2017 - changed the title
[-]Support throw-expressions[/-][+]Support 'throw' Expressions[/+]on Sep 17, 2017 - changed the title
[-]Support 'throw' Expressions[/-][+]Support 'throw' expressions[/+]on Sep 17, 2017 DanielRosenwasser commented
on Sep 17, 2017 MemberMore actionsSo is this proposal premature?
Nope, it's fine to track it here. Like Kitson Kelly (@kitsonk) said, Ron Buckton (@rbuckton) is championing it and is part of our team, but we will need it to reach a later stage before adopting it in TypeScript.
For what it's worth, I'd be willing to bet he has a branch with an implementation of
throw-expressions. 😄Reacted by Aluan HaddadReacted by Aluan Haddadhttps://github.com/Microsoft/TypeScript/tree/throwOperator?files=1
Currently it does not yet support unreachability checks at the expression level. Also, I am waiting for the next TC39 meeting to see if the proposal moves to Stage 2.
Reacted by Aluan HaddadReacted by Aluan HaddadDaniel Rosenwasser (@DanielRosenwasser) Ron Buckton (@rbuckton)
I got it.
Thank you for the detailed explanation!The proposal is now in stage 2 - would be cool if this gets implemented in TypeScript.
TypeScript's current stance is that we will not adopt a proposed JavaScript feature until it has reached Stage 3. Currently, Stage 3 for
throwexpressions is blocked from advancement due to overlap with thedoexpressions proposal.Ah, I see. Thanks, Ron Buckton (@rbuckton)!
- addedWaiting for TC39Unactionable until TC39 reaches some conclusionUnactionable until TC39 reaches some conclusion
on Aug 15, 2018 This is now in stage 3 :)
No, this has not yet advanced to Stage 3.
- locked and limited conversation to collaborators
on Jun 25, 2019 RyanCavanaugh commented
on Mar 15, 2024 MemberMore actionsClosing since there's nothing for us to do but wait for TC39
Support proposal-throw-expressions.
That proposal is now stage-1, but worth to implements for convenience and this proposal not break backward-compatibilities.
Current
ts
js
Proposal
ts
js