hey. we created a source for Rescript web application and it sends the data to segment destination.
I am doing this:
Avo.initAvo(~env=#dev, ~segmentSothebysWebDestination=inspectorCustomDestination, ())
and you could see that there is a required property called
segmentSothebysWebDestination
and according to the Rescript code the type of this is the following:
type avoCustomDestination = {
make: (avoEnvType, option(string)) => unit,
logEvent: (string, Js.Json.t) => unit,
logPage: (string, Js.Json.t) => unit,
revenue: (float, Js.Json.t) => unit,
setUserProperties: (string, Js.Json.t) => unit,
identify: (string) => unit,
unidentify: unit => unit,
setGroupProperties: (string, string, Js.Json.t) => unit,
addCurrentUserToGroup: (string, string, Js.Json.t) => unit,
logEventWithGroups: (string, Js.Json.t, Js.Json.t) => unit
};
it means that all properties are required
but in your doc here:
you could see that some methods are optional like (make, revenue, setGroupProperties etc)
is it a bug in your code for rescript?
because for exmaple in Typescript code all properties are optional