How to manage a list of lists (i.e. array of arrays)?

I have the following example data structure:

const tree = {
  branches: [
    [{ brown: true }, { brown: false }]
    [{ brown: false }]
  ]
}

How can I create a schema for this? I’ve tried the following (note that this is an extracted example, so it might be slightly pseudo code):

class Leaf {
  static schema: ObjectSchema = {
    name: 'Leaf',
    embedded: true,
    properties: {
      brown: 'boolean',
    }
  }
}

class Tree {
  static schema: ObjectSchema = {
    name: 'Tree',
    properties: {
      // I've tested this
      branches: {
        type: 'list',
        objectType: {
          type: 'list',
          objectType: Leaf.schema.name
        }
      }
      // And also this
      branches: {
        bsonType: 'array',
        items: {
          bsonType: 'array',
          items: Leaf.schema.name
        }
      }
    }
  }
}

Both result in one of the following error:

Error while parsing property ‘branches’ of object with name ‘Tree’. Error: objectType must be of type ‘string’, got (undefined)

or

Error while parsing property ‘branches’ of object with name ‘Tree’. Error: objectType must be of type ‘string’, got ([Object, Object])

I had a similar issue when trying to sync geospatial types, like MultiPolygons coordinates, which need [[[lon, lat]]]. I posted to support and they came back saying that Realm sync doesn’t support array of arrays so I had to write a function to map from nested arrays of key-value objects to the required geospatial format.

I hope they support these in the future.