@theoplayer/react-native-engage
Version:
Engage connector for @theoplayer/react-native
24 lines (21 loc) • 399 B
text/typescript
/**
* Fired when an event occurs.
*
* @public
*/
export interface Event<TType extends string = string> {
/**
* The type of the event.
*/
type: TType;
/**
* The creation date of the event.
*/
date: Date;
}
export class BaseEvent<TType extends string = string> implements Event<TType> {
constructor(
readonly type: TType,
readonly date: Date = new Date(),
) {}
}