Inferred type

let foo = true
const foo = true

Explicit

let foo: boolean = false
let bar: string = "hello"

Set type initially and initialized with a null value then change value.

let foo: boolean
foo = true
foo = false