-
-
Notifications
You must be signed in to change notification settings - Fork 75
New: Support Definite Assignment (fixes #424) #432
Conversation
0e86d65
to
cf1b7ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @azz!
The name of this property is still a little TBD.
It looks like it might end up as a something like definteAssignment
, but I think it is very unlikely that exclamationToken
will be used.
You can see the discussion with the TS Team here: babel/babel#7159
Like you say we will need to to wait until babylon supports it
Did you catch this comment? #424 (comment) |
Added my 2 cents :) (or +1ing of someone else's ha) |
I have no strong opinions either way 🤷♂️ |
As with the unique symbol one, I've started a protected |
I'm the same regarding opinion of the change - but I am strongly of the opinion that we choose whatever ends up being used in that babylon PR so that we stay aligned 👍 |
Again, with this one @azz I am just going to merge this into the 2.7 branch and then sort out any issues/cleanup. Thanks again! |
Ah no, I can't sorry, cause of the conflicts. There is also yarn.lock file that needs to be removed. |
I've pressed ahead with the TS 2.7 release so that's all merged into master now. |
cf1b7ef
to
02f1e48
Compare
Changed base branch and fixed conflicts. |
Ping @JamesHenry, we'd really like to get this out to Prettier users! |
lib/convert.js
Outdated
@@ -859,6 +863,10 @@ module.exports = function convert(config) { | |||
result.key.optional = true; | |||
} | |||
|
|||
if (node.exclamationToken) { | |||
result.exclamationToken = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggested definite
in the Babylon PR, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll follow babylon's choice - updated to definite
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
02f1e48
to
2cbd605
Compare
The build isn't passing, please just add your new specs to the ignore patterns within ast-alignment testing for now: https://github.com/eslint/typescript-eslint-parser/blob/master/tests/ast-alignment/fixtures-to-test.js#L341 |
2cbd605
to
4a9d443
Compare
Ah, sorry! Updated. |
Thanks, @azz! |
Released in 14.0.0 |
Build will fail due to this not yet supported in Babylon.