- 5 months ago 36
TypeScript Question

How to run TypeScript for validation without generating js files?

I'm using TypeScript v2.0 and

. I don't need js files, but I want use typescript for validation in my tests. So how can I run TypeScript for validation, without generating js files?


You can use the --noEmit flag.

tsc file.ts --noEmit

For validation purposes however, you may consider using a TypeScript linter instead (such as TSLint).