Typescript install: Difference between revisions
From wikinotes
No edit summary |
|||
Line 17: | Line 17: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
tsc greet.ts | tsc greet.ts // writes 'greet.js' | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- Install --> | </blockquote><!-- Install --> |
Revision as of 00:05, 17 December 2022
Install
npm install -g typescript// greet.ts function greeting(number: number, person: string) { return "hello `number`x times, `person`"; } console.log(greeting(0, "user"));tsc greet.ts // writes 'greet.js'