import { ValidationException } from './ValidationException'; export type Primitive = string | number | bigint | boolean | undefined | symbol | null; /** * Is the value any of the primitive types? * See: https://developer.mozilla.org/en-US/docs/Glossary/Primitive * * @example * ```ts * isPrimitive(1) // true * isPrimitive({}) // false * ``` * * @param value the value to check * @returns a boolean indicating whether the value is the expected type */ export declare const isPrimitive: (value: unknown) => value is Primitive; /** * Validate that the value is any of the primitive types. * See: https://developer.mozilla.org/en-US/docs/Glossary/Primitive * * @example * ```ts * validatePrimitive(1) // null * validatePrimitive({}) // ValidationException * ``` * * @param value the value to check * @returns `null` if the value is the expected type or a `ValidationException` * if not */ export declare const validatePrimitive: (value: unknown) => ValidationException | null; /** * Assert that the value is any of the primitive types. * See: https://developer.mozilla.org/en-US/docs/Glossary/Primitive * * @example * ```ts * assertPrimitive(1) // void * assertPrimitive({}) // throws AssertionException * ``` * * @param value the value to check * @throws an `AssertionException` if the value is not the expected type */ export declare const assertPrimitive: (value: unknown) => asserts value is Primitive;