import { Immutable } from './immutable';
/**
 * Immutable Set cannot be changed once created
 */
export declare class ImmutableSet<T> implements Immutable<Set<T>> {
  size: number;
  private readonly set;
  /**
   * The constructor of ImmutableSet
   *
   * @typedef T generic type parameter
   * @param {Set<T>} initialSet - The initial set to use. If not provided, the set will be empty.
   * @param {() => void} onMutate - A callback function that will be called whenever the set is mutated.
   */
  constructor(initialSet?: Set<T>, onMutate?: (newSet: ImmutableSet<T>) => void);
  /**
   * The function is called when the set is mutated
   *
   * @param {Immutable<Set<T>>} _newSet - The new set that was created.
   */
  onMutate(_newSet: Immutable<Set<T>>): void;
  /**
   * Add new items to the set, and then call the onMutate with the new ImmutableSet
   *
   * @typedef T generic type parameter
   * @param {T[]} value  - The items to add to the set.
   * @returns {ImmutableSet<T>} A new ImmutableSet with the new items added.
   */
  add(...value: T[]): ImmutableSet<T>;
  /**
   * clear the set values
   *
   * @typedef T generic type parameter
   */
  clear(): void;
  /**
   * delete item from set
   *
   * @typedef T generic type parameter
   * @param {T} value - The key to delete from the set.
   * @returns {ImmutableSet<T>} A new ImmutableSet
   */
  delete(value: T): ImmutableSet<T>;
  /**
   * It takes a function that mutates a set, and returns a new immutable set that is the result of that mutation
   *
   * @param {(set: Set<T>) => void} fn - (set: Set<T>) => void
   * @returns {ImmutableSet<T>} A new ImmutableSet
   */
  withMutation(fn: (set: Set<T>) => void): ImmutableSet<T>;
  /**
   * It returns true if the value is in the set, and false otherwise
   *
   * @typedef T generic type parameter
   * @param {T} value - The value to check for.
   * @returns {boolean} A boolean value.
   */
  has(value: T): boolean;
  /**
   * It returns an array of the values in the set
   *
   * @returns {T[]} An array of the values in the set.
   */
  toArray(): T[];
}
