I don’t entirely understand your question, but one hack to convert your record type to javascript is you can use the identity external to “cast” the abstract type to a Js.Json.t
.
eg. (in ocaml syntax):
external personToJs : person -> Js.Json.t = "%identity"
Obviously this is not terribly safe, so if you adopt this approach try to limit its usage or encapsulate it to a scope where you know the type has the [@bs.deriving abstract]
annotation.
Example in real life: https://github.com/struktured/bs-holochain/blob/master/src/entry.ml#L50