schema
schema copied to clipboard
[Bug]: better error message when trying to use nested maps of maps, maps of arrays, etc
When user tries to define nested complex types, like this:
@type({ map: { map: "number" } })
playerScores = new MapSchema<MapSchema<number>>();
@type({ map: { array: "string" } })
playerTags = new MapSchema<ArraySchema<string>>();
The server crashes with the following error:
TypeError: Cannot read properties of null (reading 'Symbol(Symbol.metadata)')
This error is not very helpful. We need to make it more explicit this feature is not supported at the moment.