import { Conversion, Converter, Result } from '@fgv/ts-utils'; import { ExtendedArray, RangeOf, RangeOfProperties } from '../experimental'; /** * Helper function to create a `StringConverter` which converts * `unknown` to `string`, applying template conversions supplied at construction time or at * runtime as context. * @remarks * Template conversions are applied using `mustache` syntax. * @param defaultContext - Optional default context to use for template values. * @returns A new `Converter` returning `string`. * @public */ export declare function templateString(defaultContext?: unknown): Conversion.StringConverter; /** * A `Converter` which converts an iso formatted string, a number or a `Date` object to * a `Date` object. * @public */ export declare const isoDate: Converter; /** * A helper function to create a `Converter` which converts `unknown` to {@link Experimental.ExtendedArray | ExtendedArray}. * @remarks * If `onError` is `'failOnError'` (default), then the entire conversion fails if any element cannot * be converted. If `onError` is `'ignoreErrors'`, then failing elements are silently ignored. * @param converter - `Converter` used to convert each item in the array * @param ignoreErrors - Specifies treatment of unconvertible elements * @beta */ export declare function extendedArrayOf(label: string, converter: Converter, onError?: Conversion.OnError): Converter, TC>; /** * A helper wrapper to construct a `Converter` which converts to an arbitrary strongly-typed * range of some comparable type. * @param converter - `Converter` used to convert `min` and `max` extent of the range. * @param constructor - Static constructor to instantiate the object. * @public */ export declare function rangeTypeOf, TC = unknown>(converter: Converter, constructor: (init: RangeOfProperties) => Result): Converter; /** * A helper wrapper to construct a `Converter` which converts to {@link Experimental.RangeOf | RangeOf} * where `` is some comparable type. * @param converter - `Converter` used to convert `min` and `max` extent of the range. * @public */ export declare function rangeOf(converter: Converter): Converter, TC>; //# sourceMappingURL=converters.d.ts.map