UNPKG

@cowwoc/requirements

Version:

A fluent API for enforcing design contracts with automatic message generation.

19 lines (18 loc) 668 B
/** * Returns the string representation of a value. * * @param value - a value * @param seen - the objects that we've seen before * @returns the string representation of the value */ type StringMapper = (value: unknown, seen?: Set<unknown>) => string; /** * @param value - a value * @returns true if the value has the number of parameters expected by `StringMapper` */ declare function isStringMapper(value: unknown): value is StringMapper; /** * Uses {@link internalValueToString} to convert objects to a string. */ declare const INTERNAL_VALUE_TO_STRING: (value: unknown) => string; export { type StringMapper, isStringMapper, INTERNAL_VALUE_TO_STRING };