selective-option
Version:
A simple selective option resolver
12 lines • 2.5 kB
TypeScript
import type { AllowNullish, Nullish, TypeCheckFunction } from '../types/private-types';
import type { BoolBasedResolver, KeyList, SpecialKeys } from '../types/resolver-types';
export declare function createBoolBasedResolver<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>): BoolBasedResolver<K, S, V | boolean, O, D>;
export declare function createBoolBasedResolver<K extends string, V, O extends string, D = V>(keys: KeyList<K>, isValidValue: TypeCheckFunction<V>, defaultValue: D, overrideKey: O, special?: Nullish): BoolBasedResolver<K, never, V | boolean, O, D>;
export declare function createBoolBasedResolver<K extends string, S extends string, O extends string, D>(keys: KeyList<K>, isValidValue: Nullish, defaultValue: D, overrideKey: O, special: SpecialKeys<S, K>): BoolBasedResolver<K, S, boolean, O, D>;
export declare function createBoolBasedResolver<K extends string, O extends string, D>(keys: KeyList<K>, isValidValue: Nullish, defaultValue: D, overrideKey: O, special?: Nullish): BoolBasedResolver<K, never, boolean, O, D>;
export declare function createBoolBasedResolver<K extends string, S extends string, V, O extends string>(keys: KeyList<K>, isValidValue: TypeCheckFunction<V>, defaultValue: V | boolean, overrideKey: O, special: SpecialKeys<S, K>): BoolBasedResolver<K, S, V | boolean, O>;
export declare function createBoolBasedResolver<K extends string, V, O extends string>(keys: KeyList<K>, isValidValue: TypeCheckFunction<V>, defaultValue: V | boolean, overrideKey: O, special?: Nullish): BoolBasedResolver<K, never, V | boolean, O>;
export declare function createBoolBasedResolver<K extends string, S extends string, O extends string>(keys: KeyList<K>, isValidValue: Nullish, defaultValue: boolean, overrideKey: O, special: SpecialKeys<S, K>): BoolBasedResolver<K, S, boolean, O>;
export declare function createBoolBasedResolver<K extends string, O extends string>(keys: KeyList<K>, isValidValue: Nullish, defaultValue: boolean, overrideKey: O, special?: Nullish): BoolBasedResolver<K, never, boolean, O>;
export declare function createBoolBasedResolver<K extends string, S extends string, V, O extends string, D = V>(keys: KeyList<K>, isValidValue: AllowNullish<TypeCheckFunction<V>>, defaultValue: D, overrideKey: O, special?: AllowNullish<SpecialKeys<S, K>>): BoolBasedResolver<K, S, V | boolean, O, D>;
//# sourceMappingURL=bool-based.d.ts.map