/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import type { LocalCompressedId, NumericUuid } from "./identifiers.js"; import type { SessionId, StableId } from "./types/index.js"; /** * Generate a random session ID * @legacy @beta */ export declare function createSessionId(): SessionId; /** * Asserts that the given string is a stable ID. * @internal */ export declare function assertIsStableId(stableId: string): StableId; /** * Asserts that the given string is a stable ID. */ export declare function assertIsSessionId(stableId: string): SessionId; /** * Generate a random stable ID * @internal */ export declare function generateStableId(): StableId; /** * Returns true iff the given string is a valid Version 4, variant 2 UUID * 'xxxxxxxx-xxxx-4xxx-vxxx-xxxxxxxxxxxx' * @internal */ export declare function isStableId(str: string): str is StableId; /** * A numeric comparator used for sorting in ascending order. * * Handles +/-0 like Map: -0 is equal to +0. */ export declare function compareFiniteNumbers(a: T, b: T): number; /** * Compares strings lexically to form a strict partial ordering. */ export declare function compareStrings(a: T, b: T): number; /** * Compares bigints to form a strict partial ordering. */ export declare function compareBigints(a: T, b: T): number; export declare function genCountFromLocalId(localId: LocalCompressedId): number; export declare function localIdFromGenCount(genCount: number): LocalCompressedId; export declare function numericUuidFromStableId(stableId: StableId): NumericUuid; export declare function stableIdFromNumericUuid(numericUuid: NumericUuid): StableId; export declare function offsetNumericUuid(numericUuid: NumericUuid, offset: number): NumericUuid; export declare function subtractNumericUuids(a: NumericUuid, b: NumericUuid): NumericUuid; export declare function addNumericUuids(a: NumericUuid, b: NumericUuid): NumericUuid; //# sourceMappingURL=utilities.d.ts.map