-
Notifications
You must be signed in to change notification settings - Fork 179
ignoreDiagnostics like ts-loader #150
ignoreDiagnostics like ts-loader #150
Conversation
CC @yaroslavya |
@AppShipIt thanks! I'll look through it! I know that some people find this useful, but in my practice i've never wanted to silence errors. Could you please provide some examples about why do you need this? |
Yeah I'll add a note to the readme as well. The major one is microsoft/TypeScript#6319. TL;DR you cannot get tree shaking from WebPack 2 without it. I took a lot of inspiration from the Rollup plugin (see microsoft/TypeScript#6319 (comment)). But I'm also trying to migrate a legacy code base from Babel. TypeScript complains about a number of constructs (class/instance properties most annoyingly e.g. microsoft/TypeScript#7216) in JavaScript (no types yet) but nonetheless transpiles correctly. It sounds like they plan to be fix that but not soon. |
@s-panferov I refactored the npm scripts too. Let me know if you prefer that in a separate PR. Edit: |
Rename conventionally and initiate `lint` before `build`, `build` before `test`, and `test` before `publish`.
lineChar = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start); | ||
} | ||
return ( | ||
`[${ instanceName }] ` + (diagnostic.file ? diagnostic.file.fileName : '') |
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.
instanceName
disappeared. Was it intentional?
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.
Noted where it moved to. This just unwrapped errors.map()
. Most of the diff is indentation.
@AppShipIt hi!, Sorry for the delay, I had a hard work week. I have only two little questions and after that it can be merged. |
Sorry, my eyes lie to me today. Everything is fine! Thanks again! |
@@ -1,6 +1,3 @@ | |||
.tscache | |||
node_modules | |||
dist |
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.
You're right I should've left this line so TS output doesn't get published to npm. The next two lines can still be removed though and maybe add dist.babel/test
.
Landed as |
@AppShipIt I'm kind of lost. Can we use generators in Typescript with |
Generators (or |
@AppShipIt so even if we use regenerator we cannot avoid babel step at the moment, right? |
Yes and no. TS will correctly emit |
Close #148.