Void

suggest change

If you have no type at all, commonly used for functions that do not return anything:

function log(): void {
    console.log('I return nothing');
}

void types Can only be assigned null or undefined.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


TypeScript core types:
* Tuple
* Void
* Any
* Enum
* Array
* String
* Number

Table Of Contents