Question mark before Type (e.g. ?Bool)

Where in the Motoko documentation is this question mark before a type described? for example

type Bits = {next : () → ?Bool};

What does “?” in that position do?

The ? is used to specify optional types: Language quick reference | Internet Computer Home.
It means the value can either be a null type or the type defined after it.
In this case, it’s either a null or a Boolean value.

2 Likes