selective-option
Version:
A simple selective option resolver
8 lines • 1.42 kB
TypeScript
import type { AllowNullish, Nullish, TypeCheckFunction } from '../types/private-types';
import type { KeyList, PotentialResolver, SpecialKeys } from '../types/resolver-types';
export declare function createObjectResolver<K extends string, S extends string, V, O extends string, D = V>(keys: KeyList<K>, isValidValue: TypeCheckFunction<V>, defaultValue: D, overrideKey: O, special: SpecialKeys<S, K>): PotentialResolver<K, V | D>;
export declare function createObjectResolver<K extends string, V, O extends string, D = V>(keys: KeyList<K>, isValidValue: TypeCheckFunction<V>, defaultValue: D, overrideKey: O, special?: Nullish): PotentialResolver<K, V | D>;
export declare function createObjectResolver<K extends string, S extends string, V, O extends string>(keys: KeyList<K>, isValidValue: TypeCheckFunction<V>, defaultValue: V, overrideKey: O, special: SpecialKeys<S, K>): PotentialResolver<K, V>;
export declare function createObjectResolver<K extends string, V, O extends string>(keys: KeyList<K>, isValidValue: TypeCheckFunction<V>, defaultValue: V, overrideKey: O, special?: Nullish): PotentialResolver<K, V>;
export declare function createObjectResolver<K extends string, S extends string, V, O extends string, D = V>(keys: KeyList<K>, isValidValue: TypeCheckFunction<V>, defaultValue: D, overrideKey: O, special?: AllowNullish<SpecialKeys<S, K>>): PotentialResolver<K, V | D>;
//# sourceMappingURL=object.d.ts.map