import { DetailedResult } from '../base'; import { IReadOnlyResultMap, ResultMapResultDetail } from './readonlyResultMap'; import { ResultMap, ResultMapValueFactory } from './resultMap'; import { KeyValueConverters } from './keyValueConverters'; /** * A read-only interface exposing non-mutating methods of a {@link Collections.ResultMapValidator | ResultMapValidator}. * @public */ export interface IReadOnlyResultMapValidator { /** * {@inheritdoc Collections.ResultMapValidator.map} */ readonly map: IReadOnlyResultMap; /** * {@inheritdoc Collections.ResultMap.get} */ get(key: string): DetailedResult; /** * {@inheritdoc Collections.ResultMap.has} */ has(key: string): boolean; } /** * Parameters for constructing a {@link Collections.ResultMapValidator | ResultMapValidator}. * @public */ export interface IResultMapValidatorCreateParams { map: ResultMap; converters: KeyValueConverters; } /** * A {@link Collections.ResultMap | ResultMap} wrapper which validates weakly-typed keys * before calling the wrapped result map. * @public */ export declare class ResultMapValidator implements IReadOnlyResultMapValidator { readonly converters: KeyValueConverters; get map(): IReadOnlyResultMap; protected _map: ResultMap; /** * Constructs a new {@link Collections.ResultMapValidator | ResultMapValidator}. * @param params - Required parameters for constructing the result map validator. */ constructor(params: IResultMapValidatorCreateParams); /** * {@inheritdoc Collections.ResultMap.add} */ add(key: string, value: unknown): DetailedResult; /** * {@inheritdoc Collections.ResultMap.delete} */ delete(key: string): DetailedResult; /** * {@inheritdoc Collections.ResultMap.get} */ get(key: string): DetailedResult; /** * {@inheritdoc Collections.ResultMap.(getOrAdd:1)} */ getOrAdd(key: string, value: unknown): DetailedResult; /** * {@inheritdoc Collections.ResultMap.(getOrAdd:2)} */ getOrAdd(key: string, factory: ResultMapValueFactory): DetailedResult; /** * {@inheritdoc Collections.ResultMap.has} */ has(key: string): boolean; /** * {@inheritdoc Collections.ResultMap.set} */ set(key: string, value: unknown): DetailedResult; /** * {@inheritdoc Collections.ResultMap.update} */ update(key: string, value: unknown): DetailedResult; /** * Gets a read-only version of this validator. */ toReadOnly(): IReadOnlyResultMapValidator; /** * Determines if a value is a {@link Collections.ResultMapValueFactory | ResultMapValueFactory}. * @param value - The value to check. * @returns `true` if the value is a {@link Collections.ResultMapValueFactory | ResultMapValueFactory}, * `false` otherwise. * @public */ protected _isResultMapValueFactory(value: TV | ResultMapValueFactory): value is ResultMapValueFactory; } //# sourceMappingURL=resultMapValidator.d.ts.map