UNPKG

@fast-check/poisoning

Version:

Set of utilities to ease detection and revert of poisoning

14 lines (13 loc) 546 B
/** Alias for Set.prototype.add */ export declare const AddSymbol: unique symbol; /** Alias for Set.prototype.has */ export declare const HasSymbol: unique symbol; /** Set instance enriched with aliased methods that cannot be poisoned */ export type PoisoningFreeSet<K> = Set<K> & { [AddSymbol]: (key: K) => Set<K>; [HasSymbol]: (key: K) => boolean; }; /** Factory responsible to build instances of PoisoningFreeMap */ export declare const PoisoningFreeSet: { from<K>(ins?: readonly K[] | Iterable<K> | null): PoisoningFreeSet<K>; };