TopoJSON objects are primarily made up of geometry primitives that are the same as those used in Geojson. For example you can have a single Point or Linestring.
These are grouped under the Geometry module and in particular the Geometry.geometry type. These can be accessed and pattern-matched against using the Geometry.geometryfunction. For example:
let is_linestring t =
let open Topojson in
match Geometry.geometry t with
| Geometry.LineString _ -> true
| _ -> false
The Topology.t is the most common TopoJSON object for the main document. This contains a map of geometry objects along with other important components of the topology including the arc index and transform information.
Finally we have the main TopoJSON object. Most frequently this will be a Topology.t but could technically be a standalone Geometry.t according to the specification.