Skip to content

Commit

Permalink
UserEventHandler types - 2.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
arietrouw committed Sep 6, 2024
1 parent 1c5462d commit ddd8f03
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xylabs/pixel",
"version": "2.0.3",
"version": "2.0.4",
"description": "Event Client for xylabs ESB",
"homepage": "https://xylabs.com",
"bugs": {
Expand Down
12 changes: 7 additions & 5 deletions src/UserEventHandler.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import type { EmptyObject } from '@xylabs/object'

import type { FunnelStartedFields } from './FunnelStartedFields.js'
import type { TestStartedFields } from './TestStartedFields.js'
import type { UserClickFields } from './UserClickFields.js'
import type { ViewContentFields } from './ViewContentFields.js'

export abstract class UserEventHandler<T> {
abstract funnelStarted(fields: T | FunnelStartedFields): Promise<void>
abstract testStarted(fields: T | TestStartedFields): Promise<void>
abstract userClick(fields: T | UserClickFields): Promise<void>
abstract viewContent(fields: T | ViewContentFields): Promise<void>
export abstract class UserEventHandler<TData extends EmptyObject> {
abstract funnelStarted<T extends TData>(fields: T | FunnelStartedFields): Promise<void>
abstract testStarted<T extends TData>(fields: T | TestStartedFields): Promise<void>
abstract userClick<T extends TData>(fields: T | UserClickFields): Promise<void>
abstract viewContent<T extends TData>(fields: T | ViewContentFields): Promise<void>
}

0 comments on commit ddd8f03

Please sign in to comment.