mul14
6/26/2018 - 2:46 PM

Example @ts-check usage

Example @ts-check usage

function getTemprature() {
  return 20
}

if (getTemprature > 100) {
  alert('DANGER!')
} else {
  alert("It's ok")
}

data = { name: 'Mulia', height: 170 }

addUser(data)

function sum(a, b) {
  return a * b
}

sum('10', 'not a number')

function reserveText(title) {
  return title.split('').reserve().join('')
}

reserveText(12992)