setting a type as a string or boolean in typescript code example Example: how to declare a boolean in typescript let isDone: boolean = false;