void type ts code example
Example 1: how to declare a boolean in typescript
let isDone: boolean = false;
Example 2: void in ts
// Similar to languages like Java, void is used where there is no data.
// For example, if a function does not return any value then you can
// specify void as return type.
function sayHi(): void {
console.log('Hi!')
}
let speech: void = sayHi();
console.log(speech); //Output: undefined