Btw, in Typescript, there's a concept of generics where we can allow a user to define the types for their docs and pass that into the Typesense Typescript library and that gets used internally to also represent the highlight structure, by just replacing the leaf matched field to the highlight structure (not sure if we've implemented this yet, but it should be theoretically possible. But we've implemented this pattern to represent the hits[].document field for eg)