Newer
Older

Reid Givens
committed
export class Action {
type: string;
timestamp: Date;
id: string | number;
constructor(type: string, id: string | number) {
this.type = type;
this.id = id;
this.timestamp = new Date();
}
get timeSince(): number {
return Date.now() - this.timestamp.getTime();
}
}