Skip to content

Values and calls

let tests = run("npm test") // a result: .failed .output .code
let name = "world"
let msg = "hello {name}" // {} inside a string interpolates
let files = [./a.ts, ./b.ts] // a list
let cfg = { port: 8080, host: "x" } // a record
mut count = 0 // mut can change
  • let is fixed; mut is changeable.
  • Strings use double quotes with {name} interpolation.
  • Paths are a real type, written bare.
  • Statements end at the newline: no semicolons. Comments start with //.
  • Whitespace inside brackets is free and trailing commas are allowed.