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 {
7575 if ( key !== PluginType . destination ) {
7676 if ( result === undefined ) {
7777 return ;
78- } else if ( key === PluginType . enrichment && pluginResult ?. enrichment ) {
78+ } else if ( key === PluginType . enrichment && pluginResult ?. enrichment && typeof pluginResult . enrichment === 'function' ) {
7979 result = pluginResult . enrichment ( pluginResult ) ;
8080 } else {
8181 result = pluginResult ;
Original file line number Diff line number Diff line change @@ -153,12 +153,12 @@ export type Config = {
153153} ;
154154
155155export 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 > ;
159159 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 > ;
162162 reset : ( resetAnonymousId ?: boolean ) => Promise < void > ;
163163} ;
164164
You can’t perform that action at this time.
0 commit comments