Typescript tsc: Difference between revisions
From wikinotes
(Created page with "<code>tsc</code> is typescript's compiler. = Install = <blockquote> <syntaxhighlight lang="bash"> npm install -g typescript </syntaxhighlight> </blockquote><!-- Install --> = Usage = <blockquote> <syntaxhighlight lang="bash"> tsc foo.ts # type-check foo.ts </syntaxhighlight> </blockquote><!-- Usage -->") |
(→Usage) |
||
(One intermediate revision by the same user not shown) | |||
Line 11: | Line 11: | ||
<blockquote> | <blockquote> | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
tsc foo.ts | tsc foo.ts # typecheck/build foo.js, writing 'foo.js' even if errors | ||
tsc --noEmitOnError foo.ts # typecheck/build foo.js, only writing 'foo.js' if no errors | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- Usage --> | </blockquote><!-- Usage --> |
Latest revision as of 01:08, 17 December 2022
tsc
is typescript's compiler.
Install
npm install -g typescript
Usage
tsc foo.ts # typecheck/build foo.js, writing 'foo.js' even if errors tsc --noEmitOnError foo.ts # typecheck/build foo.js, only writing 'foo.js' if no errors