UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

16 lines 370 B
/** * @public * Provides an incrementing integer identifier. * * @remarks * By default the first ID will be 1, this may be configured at construction. */ export class IncrementingIdentifierFactory { constructor(id = 1) { this.id = id; } getNextId() { return this.id++; } } //# sourceMappingURL=incrementing-identifier-factory.js.map