Skip to content

Commit

Permalink
refactor(associative): update IEquivSet & EquivSetConstructor
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Mar 28, 2019
1 parent b57a1c0 commit 75cc900
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions packages/associative/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,26 @@ import {
ICopy,
IEmpty,
IEquiv,
IGet,
IInto,
Predicate2
} from "@thi.ng/api";

export interface IEquivSet<T>
extends Set<T>,
ICopy<IEquivSet<T>>,
IEmpty<IEquivSet<T>>,
IEquiv {
readonly [Symbol.species]: EquivSetConstructor;
into(xs: Iterable<T>): this;
IEquiv,
IGet<T, T>,
IInto<T, IEquivSet<T>> {
disj(xs: Iterable<T>): this;
get(val: T, notFound?: any): any;
first(): T;
}

export interface EquivSetConstructor {
new (): IEquivSet<any>;
new <T>(values?: Iterable<T>, opts?: any): IEquivSet<T>;
readonly prototype: IEquivSet<any>;
export interface EquivSetConstructor<T> {
new (): IEquivSet<T>;
new (values?: Iterable<T>, opts?: any): IEquivSet<T>;
readonly prototype: IEquivSet<T>;
}

export interface EquivSetOpts<T> {
Expand All @@ -35,7 +36,7 @@ export interface EquivSetOpts<T> {
}

export interface EquivMapOpts<K> extends EquivSetOpts<K> {
keys: EquivSetConstructor;
keys: EquivSetConstructor<K>;
}

/**
Expand Down

0 comments on commit 75cc900

Please sign in to comment.