Error when creating instance of Case data type using Schema
Hey all. I'm trying to use Schema to validate some json back from Dynamo and then create an instance of a Case data type but I'm getting a readonly assignment error.
The Case is defined as (I get the same error if I define a tagged class too)
and the schema I'm using to validate from Dynamo is
I notice that the
the
anyone know what I'm doing wrong?
The Case is defined as (I get the same error if I define a tagged class too)
and the schema I'm using to validate from Dynamo is
I notice that the
S.nonEmptyArray results in a readonly field, where as the others don't, which is causing me the error, as when I try to do the
name field gives me The type 'readonly [string, ...string[]]' is 'readonly' and cannot be assigned to the mutable type '[string, string[]]'anyone know what I'm doing wrong?
