export abstract class Entry { public timestamp; protected constructor() { this.timestamp = new Date(); } } export class SystemMessage extends Entry { constructor(public message: string, public severity: SeverityEnum) { super(); } public get type(): string { return 'system' } } export enum SeverityEnum { info = 'info', warning = 'warning', error = 'error', }