object-shape-tester
Version:
Test object properties and value types.
19 lines (18 loc) • 619 B
TypeScript
import { type Uuid } from '@augment-vir/common';
export { type Uuid } from '@augment-vir/common';
/**
* Creates a shape that requires a UUID string.
*
* @category Shape
* @example
*
* ```ts
* import {uuidShape, checkValidShape} from 'object-shape-tester';
*
* const myShape = uuidShape();
*
* checkValidShape('00000000-0000-1000-0000-000000000000', myShape); // `true`
* checkValidShape('0-0', myShape); // `false`
* ```
*/
export declare function uuidShape(defaultValue?: Uuid): import("../shape/shape.js").Shape<import("@sinclair/typebox").TUnsafe<`${string}-${string}-${string}-${string}-${string}`>>;