import type {Log, Logger} from './logger'; /** * A logger that stores all logs in memory. */ export class InMemoryLogger implements Logger { /** * The received logs. */ private readonly logs: T[] = []; public log(log: T): void { this.logs.push(log); } /** * Returns all received logs. */ public getLogs(): readonly T[] { return this.logs; } }