shelving
Version:
Toolkit for using data in JavaScript.
15 lines (14 loc) • 692 B
TypeScript
import { StringSchema, type StringSchemaOptions } from "./StringSchema.js";
/**
* Type of `StringSchema` that defines a valid UUID (versions 1-5). Defaults to any-version validation.
* - Input is trimmed and lowercased.
* - Falsy values are converted to empty string.
*/
export declare class UUIDSchema extends StringSchema {
constructor({ one, title, ...rest }?: Omit<StringSchemaOptions, "input" | "min" | "max" | "match" | "rows">);
sanitize(str: string): string;
}
/** Any valid UUID (versions 1-5) */
export declare const UUID: UUIDSchema;
/** Any valid UUID (versions 1-5) or null */
export declare const NULLABLE_UUID: import("./NullableSchema.js").NullableSchema<string>;