10.8.0-beta.0: AnyRealmValue type Question

Not sure if this is the correct place for a question about a beta release but I wanted to get clarification on the new Mixed Data Type AnyRealmValue in 10.8.0-beta.0

The documentation states

you can’t declare an AnyRealmValue as optional

However, the code following that statement shows

// This dog has no companion.
// You can set the field's type to "none", which represents `nil`
myDog.companion.value = .none

So… the value can be set to .none which represents nil which would mean the value is optional but it can’t be declared as optional?

The use of the word ‘represents’ leads me to believe there’s more to the story - can we get clarification?

Perhaps we need to update the documentation to make this clearer, but one of the valid values for mixed is “null”. Therefore it doesn’t really fit into the normal pattern of optional / required since it is inherently always optional in that sense, which is why the JSON schema will actually error if this field is made required.

I will file a ticket with our docs team about updating this language. Thanks for flagging!