Mapped Types (typescript)

ref – https://www.typescriptlang.org/docs/handbook/2/mapped-types.html

declare a type called AllAreBooleanProperties that takes in a type object called Type.
Then for every property in object Type, declare it to be boolean.

Example usage, say we have an object type that has properties type () => void:

now we use our AllAreBooleanProperties type generator and create a type that says all properties must be boolean:

Thus creating a type that forces object type to have all boolean properties.