/** * The Counter class is a mutable data type to encapsulate a counter. *

* For additional documentation, * see Section 1.2 of * Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne. */ export default class Counter { private readonly name; private count; constructor(id: string); /** * Increments the counter by 1. */ increment(): void; /** * Returns the current value of this counter. * * @return the current value of this counter */ tally(): number; /** * Returns a string representation of this counter. * * @return a string representation of this counter */ toString(): string; }