@dwp/govuk-casa
Version:
A framework for building GOVUK Collect-And-Submit-Applications
26 lines (25 loc) • 916 B
TypeScript
export type ContextIdGenerator = import("../casa.js").ContextIdGenerator;
/** @typedef {import("../casa.js").ContextIdGenerator} ContextIdGenerator */
/**
* Creates an instance of a UUID generator.
*
* @returns {ContextIdGenerator} Generator function
*/
export function uuid(): ContextIdGenerator;
/**
* Returns a generator that returns the next incremental integer in a sequence.
*
* This generator does not take into account the removal of any contexts from
* session that were previously assigned a sequential ID. This means that IDs
* will be re-used when they are freed up.
*
* @returns {ContextIdGenerator} Generator function
*/
export function sequentialInteger(): ContextIdGenerator;
export function shortGuid({ length, prefix, pool }?: {
length?: number | undefined;
prefix?: string | undefined;
pool?: string | undefined;
}): ({ reservedIds }: {
reservedIds: any;
}) => string;