Closed ehaynes99 closed 3 years ago
@gregoryzh do you have anything you want to add? Since #72 is similar to this PR, let's work together on one.
@gregoryzh do you have anything you want to add? Since #72 is similar to this PR, let's work together on one.
sure, One thing, since we are solving the Agular bracket issue for ts. @ehaynes99 can you add a test case for that?
Good catch. I had one, but must have accidentally removed it. Added.
The JSX plugin for Typescript is not compatible with bracket-style type assertions. This led to the introduction of the
as
keyword as an alternate: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-1-6.html#new-tsx-file-extension-and-as-operatorThis restricts the plugin to only be used with
.tsx
files.NOTE: There was a copy/paste error in the babel parser test that was skipping over the existing JSX test. Since other tests in the same file were using a comparison of the whole object that precludes such omissions, I changed the style of 2 of the tests to be consistent with this.