File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ export class Timeline {
75
75
if ( key !== PluginType . destination ) {
76
76
if ( result === undefined ) {
77
77
return ;
78
- } else if ( key === PluginType . enrichment && pluginResult ?. enrichment ) {
78
+ } else if ( key === PluginType . enrichment && pluginResult ?. enrichment && typeof pluginResult . enrichment === 'function' ) {
79
79
result = pluginResult . enrichment ( pluginResult ) ;
80
80
} else {
81
81
result = pluginResult ;
Original file line number Diff line number Diff line change @@ -153,12 +153,12 @@ export type Config = {
153
153
} ;
154
154
155
155
export type ClientMethods = {
156
- screen : ( name : string , properties ?: JsonMap ) => Promise < void > ;
157
- track : ( event : string , properties ?: JsonMap ) => Promise < void > ;
158
- identify : ( userId ?: string , userTraits ?: UserTraits ) => Promise < void > ;
156
+ screen : ( name : string , properties ?: JsonMap , enrichment ?: EnrichmentClosure ) => Promise < void > ;
157
+ track : ( event : string , properties ?: JsonMap , enrichment ?: EnrichmentClosure ) => Promise < void > ;
158
+ identify : ( userId ?: string , userTraits ?: UserTraits , enrichment ?: EnrichmentClosure ) => Promise < void > ;
159
159
flush : ( ) => Promise < void > ;
160
- group : ( groupId : string , groupTraits ?: GroupTraits ) => Promise < void > ;
161
- alias : ( newUserId : string ) => Promise < void > ;
160
+ group : ( groupId : string , groupTraits ?: GroupTraits , enrichment ?: EnrichmentClosure ) => Promise < void > ;
161
+ alias : ( newUserId : string , enrichment ?: EnrichmentClosure ) => Promise < void > ;
162
162
reset : ( resetAnonymousId ?: boolean ) => Promise < void > ;
163
163
} ;
164
164
You can’t perform that action at this time.
0 commit comments