Primitive<PrintableCompoundType> resolves to (string | number | boolean | H5WebComplex)[] but we weren't actually asserting for this fully in assertPrimitiveValue. I'm correcting this and also generalising things a bit:
Resolve Primitive<CompoundType> to unknown[] instead of unknown (to match the existing array assertion in assertPrimitiveValue)
Change the generic of CompoundType to extend DType instead of Record<string, DType> to simplify usage (notably when inferring the generic in Primitive) and to remove the need for PrintableCompoundType (now replaced with just CompoundType<PrintableType>)
Primitive<PrintableCompoundType>
resolves to(string | number | boolean | H5WebComplex)[]
but we weren't actually asserting for this fully inassertPrimitiveValue
. I'm correcting this and also generalising things a bit:Primitive<CompoundType>
tounknown[]
instead ofunknown
(to match the existing array assertion inassertPrimitiveValue
)CompoundType
to extendDType
instead ofRecord<string, DType>
to simplify usage (notably when inferring the generic inPrimitive
) and to remove the need forPrintableCompoundType
(now replaced with justCompoundType<PrintableType>
)