UNPKG

hadron-document

Version:
33 lines 954 B
import type { TypeCastTypes, UUIDType } from 'hadron-type-checker'; import StandardEditor from './standard'; import type { Element } from '../element'; import type { BSONValue } from '../utils'; /** * CRUD editor for UUID values (Binary subtypes 3 and 4). */ export default class UUIDEditor extends StandardEditor { uuidType: UUIDType; /** * Create the UUID editor. * * @param element - The hadron document element. */ constructor(element: Element, displayType?: TypeCastTypes); /** * Get the value being edited as a UUID string. */ value(): string; /** * Edit the element with the provided value. */ edit(value: BSONValue): void; /** * Start the UUID edit - convert Binary to string for editing. */ start(): void; /** * Complete the UUID edit by converting the valid string back to Binary. */ complete(): void; } //# sourceMappingURL=uuid.d.ts.map