Function validateTypes

  • This is primarily to check if the type is a primitive. If the primitive is a number, find the "depth", the most complex is f64, then i64, then u64. Otherwise, if the primitives don't match, throw an error. If the type is NOT a primitive, ensure that all types in the array match

    Parameters

    • types: ShapeType[]

      either a primitive type, array, or object

    Returns ShapeType

    • a single type from the list to validate the correct type to be parsed from values later