UNPKG

snowflakify

Version:

The most complete Snowflake ID generator in TypeScript

24 lines (23 loc) 678 B
import FragmentBase from '../FragmentBase.js'; import { DestructuredFragment } from '../@types'; /** * SequenceFragment class for sequence (increment/counter) IDs. * @public */ export default class SequenceFragment extends FragmentBase { getValue(): bigint; destructure(snowflake: number | bigint | string): DestructuredFragment; /** * Returns a boolean indicating whether the sequence will reset on the next call. * * @returns `true` if the sequence will reset when the next getValue() is called. * Otherwise, returns `false`. * @internal */ willReset(): boolean; /** * Resets the sequence to 0 * @internal */ resetSequence(): void; }