I have this:
$ tsc -m amd --outFile dist/out.js lib/index.ts
lib/index.ts(87,48): error TS1005: ';' expected.
Is there a command line option I can use to ignore errors?
I have this:
$ tsc -m amd --outFile dist/out.js lib/index.ts
lib/index.ts(87,48): error TS1005: ';' expected.
Is there a command line option I can use to ignore errors?
You can use another command like:
build: tsc -m amd --outFile dist/out.js lib/index.ts
new-build: npm run build || exit 0;
|| exit 0;
always return 0; that is success code;
You can use // @ts-nocheck
at the top of your files to have typescript not check them. This will still compile the code. To the point of @Jono on another question, yes, you will still have to go through every file to do this, although it is much less work than adding // @ts-ignore
to every line. Source
With the // @ts-ignore comment, Typescript compiler will ignore the line below it.
For example, you got an compiling error here:
No. There is no option to disable error Reports in TypeScript.
I just recently tried that, to improve my build pipeline. I checked the the TypeScript sources. It shouldn't be too complicated to code a flag to basically ignore all errors. But I didn't want to go through the whole PR/Approval Process for something that does the opposite of what typescript does. I found a different solution.
I also have a huge, converted code-base. There are other tools that transform TypeScript to JavaScript (but they lack Error Checking - which is what you want):
Both work great in combination with rollup.js and their according plugins.
Typescript will soon have the --noCheck
command line option that does exactly this.
The version that has this option seems to at the time of writing not be released yet, but the PR is merged on 12 Jun 2024, so it should come out in the next release, or if you build from source.
When the new version is out, you should be able to do:
tsc --noResolve --noCheck [file.ts]
(No resolve disables imports, if you want imported files to be included omit this)
© 2022 - 2024 — McMap. All rights reserved.
tsc --help
doesn't provide any options to do this...what the heck – Gallop--noEmitOnError
which is set to false by default. If you were to set it to true it would not emit JS (+ .d.ts). – Vincentvincentatsc -v
)? This sounds like a fatal syntax error that is preventing the compiler from completing compilation; it can't just be ignored. – Gesture