Tooling concepts
Transpilation, targets and type checking
A compiler can transform newer syntax into an older output target. TypeScript also checks types, but type annotations are not runtime validators and target selection does not install missing browser APIs. Do not confuse successful compilation with compatibility of every API, or a successful build with runtime input validation. Example type: bash. Context: compiler-lab. Expected observation: 12. See local fixture evidence.
Formal Syntax & Structure
javascript syntaxjavascript
tsc -p tsconfig.jsonnode dist/price.jsWorking Example
Example Snippetjavascript
tsc -p tsconfig.jsonnode dist/price.js