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.

20 lines 559 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IncrementingIdentifierFactory = void 0; /** * @public * Provides an incrementing integer identifier. * * @remarks * By default the first ID will be 1, this may be configured at construction. */ class IncrementingIdentifierFactory { constructor(id = 1) { this.id = id; } getNextId() { return this.id++; } } exports.IncrementingIdentifierFactory = IncrementingIdentifierFactory; //# sourceMappingURL=incrementing-identifier-factory.js.map