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)