/** * Represents strings that are UUIDs. * * This is heavily inspired by the `validator.js` module * [`isUUID`](https://github.com/validatorjs/validator.js/blob/master/src/lib/isUUID.js). * * @since 1.0.0 */ import { Branded } from 'schemata-ts/brand'; import * as PB from 'schemata-ts/PatternBuilder'; import { SchemaExt } from 'schemata-ts/SchemaExt'; /** * See: https://github.com/validatorjs/validator.js/blob/master/src/lib/isUUID.js * * @since 1.0.0 * @category Pattern */ declare const uuidPattern: { 1: PB.Atom; 2: PB.Atom; 3: PB.Atom; 4: PB.Atom; 5: PB.Atom; any: PB.Atom; }; /** * @since 1.0.0 * @category Model */ export declare type UUIDVersion = keyof typeof uuidPattern; interface UUIDBrand { readonly UUID: unique symbol; readonly UUIDVersion: Version; } /** * Represents strings that are UUIDs. * * @since 1.0.0 * @category Model */ export declare type UUID = Branded>; /** * @since 1.0.0 * @category Model */ export declare type UUIDS = SchemaExt>; /** * @since 1.0.0 * @category Schema */ export declare const UUID: (version: Version) => UUIDS; export {}; //# sourceMappingURL=UUID.d.ts.map