UNPKG

@informalsystems/quint

Version:

Core tool for the Quint specification language

32 lines 795 B
"use strict"; /* * A generator of unique bigint identifiers. * * Igor Konnov, 2023 * * Copyright 2021 Informal Systems * Licensed under the Apache License, Version 2.0. * See LICENSE in the project root for license information. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.zerog = exports.newIdGenerator = void 0; /** * Introduce a new id generator. */ const newIdGenerator = (initialId = 0n) => { return { _lastId: initialId, nextId() { this._lastId = this._lastId + 1n; return this._lastId; }, }; }; exports.newIdGenerator = newIdGenerator; /** * An id generator that always returns 0n, instead of a unique id. */ exports.zerog = { nextId: () => 0n, }; //# sourceMappingURL=idGenerator.js.map