From 23b0c02f8f2dbdf156b03170b95bc34e7cb8437e Mon Sep 17 00:00:00 2001 From: Peter Perlepes Date: Thu, 12 Oct 2023 18:09:30 +0300 Subject: [PATCH] Add CommonEventProperties type argument (close #1249) #1250 --- ...mon-event-properties-type-arg_2023-10-11-10-45.json | 10 ++++++++++ ...mon-event-properties-type-arg_2023-10-11-10-22.json | 10 ++++++++++ libraries/tracker-core/src/core.ts | 4 ++-- trackers/browser-tracker/docs/browser-tracker.api.md | 4 ++-- 4 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 common/changes/@snowplow/browser-tracker/feature-1249-common-event-properties-type-arg_2023-10-11-10-45.json create mode 100644 common/changes/@snowplow/tracker-core/feature-1249-common-event-properties-type-arg_2023-10-11-10-22.json diff --git a/common/changes/@snowplow/browser-tracker/feature-1249-common-event-properties-type-arg_2023-10-11-10-45.json b/common/changes/@snowplow/browser-tracker/feature-1249-common-event-properties-type-arg_2023-10-11-10-45.json new file mode 100644 index 000000000..da9cef551 --- /dev/null +++ b/common/changes/@snowplow/browser-tracker/feature-1249-common-event-properties-type-arg_2023-10-11-10-45.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/browser-tracker", + "comment": "Add CommonEventProperties type argument", + "type": "none" + } + ], + "packageName": "@snowplow/browser-tracker" +} \ No newline at end of file diff --git a/common/changes/@snowplow/tracker-core/feature-1249-common-event-properties-type-arg_2023-10-11-10-22.json b/common/changes/@snowplow/tracker-core/feature-1249-common-event-properties-type-arg_2023-10-11-10-22.json new file mode 100644 index 000000000..bdb8e0495 --- /dev/null +++ b/common/changes/@snowplow/tracker-core/feature-1249-common-event-properties-type-arg_2023-10-11-10-22.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@snowplow/tracker-core", + "comment": "Add CommonEventProperties type argument", + "type": "none" + } + ], + "packageName": "@snowplow/tracker-core" +} \ No newline at end of file diff --git a/libraries/tracker-core/src/core.ts b/libraries/tracker-core/src/core.ts index 4a37e7f16..6bb8e277c 100644 --- a/libraries/tracker-core/src/core.ts +++ b/libraries/tracker-core/src/core.ts @@ -119,9 +119,9 @@ function getTimestamp(timestamp?: Timestamp | null): TimestampPayload { } /** Additional data points to set when tracking an event */ -export interface CommonEventProperties { +export interface CommonEventProperties> { /** Add context to an event by setting an Array of Self Describing JSON */ - context?: Array | null; + context?: Array> | null; /** Set the true timestamp or overwrite the device sent timestamp on an event */ timestamp?: Timestamp | null; } diff --git a/trackers/browser-tracker/docs/browser-tracker.api.md b/trackers/browser-tracker/docs/browser-tracker.api.md index 70aabae95..ae5c7f7f0 100644 --- a/trackers/browser-tracker/docs/browser-tracker.api.md +++ b/trackers/browser-tracker/docs/browser-tracker.api.md @@ -142,8 +142,8 @@ export interface ClientSession extends Record { } // @public -export interface CommonEventProperties { - context?: Array | null; +export interface CommonEventProperties> { + context?: Array> | null; // Warning: (ae-forgotten-export) The symbol "Timestamp" needs to be exported by the entry point index.module.d.ts timestamp?: Timestamp | null; }