This change makes the Typescript typings match the underlying Javascript code for functions like capture and alias by adding a second argument (callback)
Current state: the PostHog Typescript typings indicate that functions like capture and alias take only a single argument:
e.g., for capture:
capture({ distinctId, event, properties, groups }: EventMessage): void
This is despite the code actually having an important second argument that helps report errors, etc.
Changes
This change makes the Typescript typings match the underlying Javascript code for functions like
capture
andalias
by adding a second argument (callback
)Current state: the PostHog Typescript typings indicate that functions like
capture
andalias
take only a single argument:e.g., for
capture
:This is despite the code actually having an important second argument that helps report errors, etc.
...
Checklist
cc @mariusandra who wrote the original types here