Skip to content

Commit 6d5daba

Browse files
committed
Expose snowplow-ecommerce browser plugin typings (close #1291)
1 parent 79fd634 commit 6d5daba

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@snowplow/browser-plugin-snowplow-ecommerce",
5+
"comment": "Expose types",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@snowplow/browser-plugin-snowplow-ecommerce"
10+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export * from './api';
22
export * from './ua/api';
33
export * from './ga4/api';
4+
export * from './types';

plugins/browser-plugin-snowplow-ecommerce/src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,9 @@ export interface User {
317317
email?: string;
318318
}
319319

320-
export interface CommonEcommerceEventProperties extends CommonEventProperties {
320+
export interface CommonEcommerceEventProperties<T = Record<string, unknown>> extends CommonEventProperties<T> {
321321
/** Add context to an event by setting an Array of Self Describing JSON */
322-
context?: Array<SelfDescribingJson>;
322+
context?: Array<SelfDescribingJson<T>>;
323323
}
324324

325325
export type ListViewEvent = { name: string; products: Product[] };

0 commit comments

Comments
 (0)