I'm trying to build a type to describe a "simple object", which is an object which contains only primitive types, other objects and arrays which also only contain primitive types... or other objects and arrays, etc etc
type Primitive = string | number | boolean
type SimpleArray = Array<Primitive | SimpleObject | SimpleArray>
type SimpleObject = Record<string, Primitive | SimpleObject | SimpleArray>
However I am being told that I cannot use the SimpleObjecttype declaration recursively. Is there a way to describe this type?