Selection - What can we depend on?

Hey, when drawing UI we depend a lot on where the selection currently is. In order to do that in the most efficient way, it would be good to know exactly what attributes one can depend on allows beign there and which ones one has to check for. For example, can we depend on anchor and head beign attributes of any selection? Or to and from?

Everything that’s listed in the base Selection class is guaranteed to exist on state.selection.