JamesHenry / typescript-estree

:sparkles: A parser that converts TypeScript source code into an ESTree-compatible form
https://jameshenry.blog
Other
84 stars 13 forks source link

Bug in directive logic #102

Closed JamesHenry closed 5 years ago

JamesHenry commented 5 years ago

@armano2 I discovered an issues with https://github.com/JamesHenry/typescript-estree/pull/65

("use strict");

Should not be treated as a directive, it currently is. We lose the fact it is a ParenthesizedExpression completely during the conversion process which is why something like this is easy to miss.

This is one of the things babel uses the extra property for on the AST - it tracks "parenthesized": true

JamesHenry commented 5 years ago

It's super frustrating not to have this information in the AST - I see someone has even opened an issue on ESTree proposing it

JamesHenry commented 5 years ago

:tada: This issue has been resolved in version 13.5.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: