Using [email protected]:
@schema
type rule = {patterns: array<array<string>>}
@schema
type rules = array<rule>
@schema
type config = {rules: rules}
let _ = "{}"->S.parseJsonStringOrThrow(configSchema)
gives the following exception:
TypeError [Error]: Cannot read properties of undefined (reading 'length')
(instead of stating that the rules field is missing)
In [email protected], I get
SuryError: Failed parsing: Expected { rules: { patterns: string[][]; }[]; }, received { }
which is better, but I cannot use that version because of #124.