Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow ts modifier names to be used as function argument names #8030

Merged
merged 1 commit into from
Jun 12, 2018

Conversation

existentialism
Copy link
Member

Q                       A
Fixed Issues? Fixes #8022
Patch: Bug Fix? y
Major: Breaking Change? n
Minor: New Feature? n
Tests Added + Pass? y/y
Documentation PR
Any Dependency Changes?
License MIT

@existentialism existentialism added PR: Bug Fix 🐛 A type of pull request used for our changelog categories pkg: parser area: typescript labels May 24, 2018
@babel-bot
Copy link
Collaborator

babel-bot commented May 24, 2018

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/8359/

@@ -1283,7 +1283,8 @@ export default (superClass: Class<Parser>): Class<Parser> =>
): N.Pattern | N.TSParameterProperty {
let accessibility: ?N.Accessibility;
let readonly = false;
if (allowModifiers) {

if (allowModifiers && this.lookahead().type !== tt.parenR) {
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo Jun 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that it should be added to tsNextTokenCanFollowModifier, not here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

@existentialism existentialism merged commit b6455c6 into master Jun 12, 2018
@existentialism existentialism deleted the issue8022 branch June 12, 2018 13:38
storyn26383 pushed a commit to UniSharp/babel that referenced this pull request Aug 6, 2018
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: typescript outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@babel/typescript Exception when 'readonly' word is used as argument name
3 participants