diff --git a/internal/types.ts b/internal/types.ts index 8c244fc..5ad5dd0 100644 --- a/internal/types.ts +++ b/internal/types.ts @@ -12,7 +12,7 @@ interface EventData { [key: string]: string | number | boolean; } -type EventPayloadPartial = +type EventDetails = { name: string; data?: EventData; @@ -21,8 +21,8 @@ type EventPayloadPartial = event_data?: EventData; }; - type EventPayload = BasicPayload & EventPayloadPartial; - type ViewPayload = BasicPayload; +type EventPayload = BasicPayload & EventDetails; +type ViewPayload = BasicPayload; type PartialPayload = Omit; type PayloadType = 'pageview' | 'event';