UNPKG

illustrator.js

Version:

JavaScript image processing library

47 lines (46 loc) 2.83 kB
export declare class IllustratorCollection<K = unknown, V = unknown> extends Map<K, V> { #private; array(): V[]; keyArray(): K[]; reverse(): V[]; set(key: K, value: V): this; delete(key: K): boolean; clear(): void; first(): V | undefined; first(amount: number): V[]; firstKey(): K | undefined; firstKey(amount: number): K[]; last(): V | undefined; last(amount: number): V[]; lastKey(): K | undefined; lastKey(amount: number): K[]; random(): V; random(amount: number): V[]; randomKey(): K; randomKey(amount: number): K[]; find(fn: (value: V, key: K, collection: this) => boolean): V | undefined; find<T>(fn: (this: T, value: V, key: K, collection: this) => boolean, thisArg: T): V | undefined; findKey(fn: (value: V, key: K, collection: this) => boolean): K | undefined; findKey<T>(fn: (this: T, value: V, key: K, collection: this) => boolean, thisArg: T): K | undefined; sweep(fn: (value: V, key: K, collection: this) => boolean): number; sweep<T>(fn: (this: T, value: V, key: K, collection: this) => boolean, thisArg: T): number; filter(fn: (value: V, key: K, collection: this) => boolean): this; filter<T>(fn: (this: T, value: V, key: K, collection: this) => boolean, thisArg: T): this; partition(fn: (value: V, key: K, collection: this) => boolean): [this, this]; partition<T>(fn: (this: T, value: V, key: K, collection: this) => boolean, thisArg: T): [this, this]; flatMap<T>(fn: (value: V, key: K, collection: this) => IllustratorCollection<K, T>): IllustratorCollection<K, T>; flatMap<T, This>(fn: (this: This, value: V, key: K, collection: this) => IllustratorCollection<K, T>, thisArg: This): IllustratorCollection<K, T>; map<T>(fn: (value: V, key: K, collection: this) => T): T[]; map<This, T>(fn: (this: This, value: V, key: K, collection: this) => T, thisArg: This): T[]; mapValues<T>(fn: (value: V, key: K, collection: this) => T): IllustratorCollection<K, T>; mapValues<This, T>(fn: (this: This, value: V, key: K, collection: this) => T, thisArg: This): IllustratorCollection<K, T>; some(fn: (value: V, key: K, collection: this) => boolean): boolean; some<T>(fn: (this: T, value: V, key: K, collection: this) => boolean, thisArg: T): boolean; every(fn: (value: V, key: K, collection: this) => boolean): boolean; every<T>(fn: (this: T, value: V, key: K, collection: this) => boolean, thisArg: T): boolean; reduce<T>(fn: (accumulator: T, value: V, key: K, collection: this) => T, initialValue?: T): T; clone(): this; concat(...collections: IllustratorCollection<K, V>[]): this; equals(collection: IllustratorCollection<K, V>): boolean; sort(compareFunction?: (firstValue: V, secondValue: V, firstKey: K, secondKey: K) => number): this; }