type LogEntryLevel = 'debug' | 'info' | 'warn' | 'error'
class LogEntry {
constructor(
public readonly timestamp: Date,
public readonly level: LogEntryLevel,
public readonly message: string
)
toString() // Returns formatted log string
}
// Indicates the start of the build process
class LogEntryStart extends LogEntry {
constructor(timestamp: Date, message: string) {
super(timestamp, 'debug', message)
}
}
// Indicates the end of the build process
class LogEntryEnd extends LogEntry {
constructor(timestamp: Date, message: string) {
super(timestamp, 'debug', message)
}
}