import { isIterable } from "@esfx/internal-guards" ; import { deprecateProperty } from "@esfx/internal-deprecate" ; export interface ReadonlyCollection < T > extends Iterable < T > { /**
     * Gets the number of elements in the collection.
     */ readonly [ ReadonlyCollection . size ] : number ; /**
     * Tests whether an element is present in the collection.
     */ [ ReadonlyCollection . has ] ( value ) : boolean ; } export namespace ReadonlyCollection { /**
     * A well-known symbol used to define the `ReadonlyCollection#[ReadonlyCollection.size]` property.
     */ export const size = Symbol . for ( "@esfx/collection-core!ReadonlyCollection.size" ) ; /**
     * A well-known symbol used to define the `ReadonlyCollection#[ReadonlyCollection.has]` method.
     */ export const has = Symbol . for ( "@esfx/collection-core!ReadonlyCollection.has" ) ; deprecated export function isReadonlyCollection < T > ( value ) ; deprecated export function isReadonlyCollection ( value ) ; deprecated export function isReadonlyCollection ( value ) { return isIterable ( value ) && ReadonlyCollection . size in value && ReadonlyCollection . has in value ; } export const name = "ReadonlyCollection" ; /**
     * Tests whether a value supports the minimal representation of a `ReadonlyCollection`.
     */ export function hasInstance < T > ( value ) ; /**
     * Tests whether a value supports the minimal representation of a `ReadonlyCollection`.
     */ export function hasInstance ( value ) ; /**
     * Tests whether a value supports the minimal representation of a `ReadonlyCollection`.
     */ export function hasInstance ( value ) { return isIterable ( value ) && ReadonlyCollection . size in value && ReadonlyCollection . has in value ; } } export interface Collection < T > extends ReadonlyCollection < T > { /**
     * Adds an element to the collection.
     */ [ Collection . add ] ( value ) : void ; /**
     * Deletes an element from the collection.
     */ [ Collection . delete ] ( value ) : boolean ; /**
     * Clears the collection.
     */ [ Collection . clear ] ( ) : void ; } export namespace Collection { export import size = ReadonlyCollection . size ; export import has = ReadonlyCollection . has ; export import isReadonlyCollection = ReadonlyCollection . isReadonlyCollection ; /**
     * A well-known symbol used to define the `Collection#[Collection.add]` method.
     */ export const add = Symbol . for ( "@esfx/collection-core!Collection.add" ) ; Collection . delete = Symbol . for ( "@esfx/collection-core!Collection.delete" ) as typeof Collection . delete ; /**
     * A well-known symbol used to define the `Collection#[Collection.clear]` method.
     */ export const clear = Symbol . for ( "@esfx/collection-core!Collection.clear" ) ; deprecated export function isCollection < T > ( value ) ; deprecated export function isCollection ( value ) ; deprecated export function isCollection ( value ) { return Collection . hasInstance ( value ) ; } export const name = "Collection" ; /**
     * Tests whether a value supports the minimal representation of a `Collection`.
     */ export function hasInstance < T > ( value ) ; /**
     * Tests whether a value supports the minimal representation of a `Collection`.
     */ export function hasInstance ( value ) ; /**
     * Tests whether a value supports the minimal representation of a `Collection`.
     */ export function hasInstance ( value ) { return ReadonlyCollection . hasInstance ( value ) && Collection . add in value && Collection . delete in value && Collection . clear in value ; } } export declare namespace Collection { /**
     * A well-known symbol used to define the `Collection#[Collection.delete]` method.
     */ const _delete ; export { _delete as delete } ; } export interface ReadonlyIndexedCollection < T > extends ReadonlyCollection < T > { /**
     * Gets the index for a value in the collection, or `-1` if the value was not found.
     */ [ ReadonlyIndexedCollection . indexOf ] ( value , fromIndex ? ) : number ; /**
     * Gets the value at the specified index in the collection, or `undefined` if the index was outside of the bounds of the collection.
     */ [ ReadonlyIndexedCollection . getAt ] ( index ) : T | undefined ; } export namespace ReadonlyIndexedCollection { export import size = ReadonlyCollection . size ; export import has = ReadonlyCollection . has ; export import isReadonlyCollection = ReadonlyCollection . isReadonlyCollection ; /**
     * A well-known symbol used to define the `ReadonlyIndexedCollection#[ReadonlyIndexedCollection.indexOf]` method.
     */ export const indexOf = Symbol . for ( "@esfx/collection-core!ReadonlyIndexedCollection.indexOf" ) ; /**
     * A well-known symbol used to define the `ReadonlyIndexedCollection#[ReadonlyIndexedCollection.getAt]` method.
     */ export const getAt = Symbol . for ( "@esfx/collection-core!ReadonlyIndexedCollection.getAt" ) ; deprecated export function isReadonlyIndexedCollection < T > ( value ) ; deprecated export function isReadonlyIndexedCollection ( value ) ; deprecated export function isReadonlyIndexedCollection ( value ) { return ReadonlyIndexedCollection . hasInstance ( value ) ; } export const name = "ReadonlyIndexedCollection" ; /**
     * Tests whether a value supports the minimal representation of a `ReadonlyIndexedCollection`.
     */ export function hasInstance < T > ( value ) ; /**
     * Tests whether a value supports the minimal representation of a `ReadonlyIndexedCollection`.
     */ export function hasInstance ( value ) ; /**
     * Tests whether a value supports the minimal representation of a `ReadonlyIndexedCollection`.
     */ export function hasInstance ( value ) { return ReadonlyCollection . hasInstance ( value ) && ReadonlyIndexedCollection . indexOf in value && ReadonlyIndexedCollection . getAt in value ; } } export interface FixedSizeIndexedCollection < T > extends ReadonlyIndexedCollection < T > { returns [ FixedSizeIndexedCollection . setAt ] ( index , value ) : boolean ; } export namespace FixedSizeIndexedCollection { export import size = ReadonlyCollection . size ; export import has = ReadonlyCollection . has ; export import isReadonlyCollection = ReadonlyCollection . isReadonlyCollection ; export import indexOf = ReadonlyIndexedCollection . indexOf ; export import getAt = ReadonlyIndexedCollection . getAt ; export import isReadonlyIndexedCollection = ReadonlyIndexedCollection . isReadonlyIndexedCollection ; /**
     * A well-known symbol used to define the `FixedSizeIndexedCollection#[FixedSizeIndexedCollection.setAt]` method.
     */ export const setAt = Symbol . for ( "@esfx/collection-core!FixedSizeIndexedCollection.setAt" ) ; deprecated export function isFixedSizeIndexedCollection < T > ( value ) ; deprecated export function isFixedSizeIndexedCollection ( value ) ; deprecated export function isFixedSizeIndexedCollection ( value ) { return FixedSizeIndexedCollection . hasInstance ( value ) ; } export const name = "FixedSizeIndexedCollection" ; /**
     * Tests whether a value supports the minimal representation of a `FixedSizeIndexedCollection`.
     */ export function hasInstance < T > ( value ) ; /**
     * Tests whether a value supports the minimal representation of a `FixedSizeIndexedCollection`.
     */ export function hasInstance ( value ) ; /**
     * Tests whether a value supports the minimal representation of a `FixedSizeIndexedCollection`.
     */ export function hasInstance ( value ) { return ReadonlyIndexedCollection . hasInstance ( value ) && FixedSizeIndexedCollection . setAt in value ; } } export interface IndexedCollection < T > extends FixedSizeIndexedCollection < T > , Collection < T > { /**
     * Inserts a value at the specified index in the collection, shifting any following elements to the right one position.
     */ [ IndexedCollection . insertAt ] ( index , value ) : void ; /**
     * Removes the value at the specified index in the collection, shifting any following elements to the left one position.
     */ [ IndexedCollection . removeAt ] ( index ) : void ; } export namespace IndexedCollection { export import size = ReadonlyCollection . size ; export import has = ReadonlyCollection . has ; export import isReadonlyCollection = ReadonlyCollection . isReadonlyCollection ; export import indexOf = ReadonlyIndexedCollection . indexOf ; export import getAt = ReadonlyIndexedCollection . getAt ; export import isReadonlyIndexedCollection = ReadonlyIndexedCollection . isReadonlyIndexedCollection ; export import setAt = FixedSizeIndexedCollection . setAt ; export import isFixedSizeIndexedCollection = FixedSizeIndexedCollection . isFixedSizeIndexedCollection ; export import add = Collection . add ; IndexedCollection . delete = Collection . delete ; export import clear = Collection . clear ; export import isCollection = Collection . isCollection ; /**
     * A well-known symbol used to define the `IndexedCollection#[IndexedCollection.insertAt]` method.
     */ export const insertAt = Symbol . for ( "@esfx/collection-core!IndexedCollection.insertAt" ) ; /**
     * A well-known symbol used to define the `IndexedCollection#[IndexedCollection.removeAt]` method.
     */ export const removeAt = Symbol . for ( "@esfx/collection-core!IndexedCollection.removeAt" ) ; deprecated export function isIndexedCollection < T > ( value ) ; deprecated export function isIndexedCollection ( value ) ; deprecated export function isIndexedCollection ( value ) { return IndexedCollection . hasInstance ( value ) ; } export const name = "IndexedCollection" ; /**
     * Tests whether a value supports the minimal representation of an `IndexedCollection`.
     */ export function hasInstance < T > ( value ) ; /**
     * Tests whether a value supports the minimal representation of an `IndexedCollection`.
     */ export function hasInstance ( value ) ; /**
     * Tests whether a value supports the minimal representation of an `IndexedCollection`.
     */ export function hasInstance ( value ) { return FixedSizeIndexedCollection . hasInstance ( value ) && IndexedCollection . insertAt in value && IndexedCollection . removeAt in value ; } } export declare namespace IndexedCollection { const _delete ; export { _delete as delete } ; } export interface ReadonlyKeyedCollection < K , V > extends Iterable < [ K , V ] > { /**
     * Gets the number of elements in the collection.
     */ readonly [ ReadonlyKeyedCollection . size ] : number ; /**
     * Tests whether a key is present in the collection.
     */ [ ReadonlyKeyedCollection . has ] ( key ) : boolean ; /**
     * Gets the value in the collection associated with the provided key, if it exists.
     */ [ ReadonlyKeyedCollection . get ] ( key ) : V | undefined ; /**
     * Gets an `IterableIterator` for the keys present in the collection.
     */ [ ReadonlyKeyedCollection . keys ] ( ) : IterableIterator < K > ; /**
     * Gets an `IterableIterator` for the values present in the collection.
     */ [ ReadonlyKeyedCollection . values ] ( ) : IterableIterator < V > ; } export namespace ReadonlyKeyedCollection { /**
     * A well-known symbol used to define the `ReadonlyKeyedCollection#[ReadonlyKeyedCollection.size]` property.
     */ export const size = Symbol . for ( "@esfx/collection-core!ReadonlyKeyedCollection.size" ) ; /**
     * A well-known symbol used to define the `ReadonlyKeyedCollection#[ReadonlyKeyedCollection.has]` method.
     */ export const has = Symbol . for ( "@esfx/collection-core!ReadonlyKeyedCollection.has" ) ; /**
     * A well-known symbol used to define the `ReadonlyKeyedCollection#[ReadonlyKeyedCollection.get]` method.
     */ export const get = Symbol . for ( "@esfx/collection-core!ReadonlyKeyedCollection.get" ) ; /**
     * A well-known symbol used to define the `ReadonlyKeyedCollection#[ReadonlyKeyedCollection.keys]` method.
     */ export const keys = Symbol . for ( "@esfx/collection-core!ReadonlyKeyedCollection.keys" ) ; /**
     * A well-known symbol used to define the `ReadonlyKeyedCollection#[ReadonlyKeyedCollection.values]` method.
     */ export const values = Symbol . for ( "@esfx/collection-core!ReadonlyKeyedCollection.values" ) ; deprecated export function isReadonlyKeyedCollection < K , V > ( value ) ; deprecated export function isReadonlyKeyedCollection ( value ) ; deprecated export function isReadonlyKeyedCollection ( value ) { return ReadonlyKeyedCollection . hasInstance ( value ) ; } export const name = "ReadonlyKeyedCollection" ; /**
     * Tests whether a value supports the minimal representation of a `ReadonlyKeyedCollection`.
     */ export function hasInstance < K , V > ( value ) ; /**
     * Tests whether a value supports the minimal representation of a `ReadonlyKeyedCollection`.
     */ export function hasInstance ( value ) ; /**
     * Tests whether a value supports the minimal representation of a `ReadonlyKeyedCollection`.
     */ export function hasInstance ( value ) { return isIterable ( value ) && ReadonlyKeyedCollection . size in value && ReadonlyKeyedCollection . has in value && ReadonlyKeyedCollection . get in value && ReadonlyKeyedCollection . keys in value && ReadonlyKeyedCollection . values in value ; } } export interface KeyedCollection < K , V > extends ReadonlyKeyedCollection < K , V > { /**
     * Sets a value in the collection for the provided key.
     */ [ KeyedCollection . set ] ( key , value ) : void ; returns [ KeyedCollection . delete ] ( key ) : boolean ; /**
     * Clears the collection.
     */ [ KeyedCollection . clear ] ( ) : void ; } export namespace KeyedCollection { export import size = ReadonlyKeyedCollection . size ; export import has = ReadonlyKeyedCollection . has ; export import get = ReadonlyKeyedCollection . get ; export import keys = ReadonlyKeyedCollection . keys ; export import values = ReadonlyKeyedCollection . values ; export import isReadonlyKeyedCollection = ReadonlyKeyedCollection . isReadonlyKeyedCollection ; /**
     * A well-known symbol used to define the `KeyedCollection#[KeyedCollection.set]` method.
     */ export const set = Symbol . for ( "@esfx/collection-core!KeyedCollection.set" ) ; KeyedCollection . delete = Symbol . for ( "@esfx/collection-core!KeyedCollection.delete" ) as typeof KeyedCollection . delete ; /**
     * A well-known symbol used to define the `KeyedCollection#[KeyedCollection.clear]` method.
     */ export const clear = Symbol . for ( "@esfx/collection-core!KeyedCollection.clear" ) ; deprecated export function isKeyedCollection < K , V > ( value ) ; deprecated export function isKeyedCollection ( value ) ; deprecated export function isKeyedCollection ( value ) { return KeyedCollection . hasInstance ( value ) ; } export const name = "KeyedCollection" ; /**
     * Tests whether a value supports the minimal representation of a `KeyedCollection`.
     */ export function hasInstance < K , V > ( value ) ; /**
     * Tests whether a value supports the minimal representation of a `KeyedCollection`.
     */ export function hasInstance ( value ) ; /**
     * Tests whether a value supports the minimal representation of a `KeyedCollection`.
     */ export function hasInstance ( value ) { return ReadonlyKeyedCollection . hasInstance ( value ) && KeyedCollection . set in value && KeyedCollection . delete in value && KeyedCollection . clear in value ; } } export declare namespace KeyedCollection { /**
     * A well-known symbol used to define the `KeyedCollection#[KeyedCollection.delete]` method.
     */ const _delete ; export { _delete as delete } ; } export interface ReadonlyKeyedMultiCollection < K , V > extends Iterable < [ K , V ] > { /**
     * Gets the number of elements in the collection.
     */ readonly [ ReadonlyKeyedMultiCollection . size ] : number ; /**
     * Tests whether a key is present in the collection.
     */ [ ReadonlyKeyedMultiCollection . has ] ( key ) : boolean ; /**
     * Tests whether a key and value is present in the collection.
     */ [ ReadonlyKeyedMultiCollection . hasValue ] ( key , value ) : boolean ; /**
     * Gets the value in the collection associated with the provided key, if it exists.
     */ [ ReadonlyKeyedMultiCollection . get ] ( key ) : Iterable < V > | undefined ; /**
     * Gets an `IterableIterator` for the keys present in the collection.
     */ [ ReadonlyKeyedMultiCollection . keys ] ( ) : IterableIterator < K > ; /**
     * Gets an `IterableIterator` for the values present in the collection.
     */ [ ReadonlyKeyedMultiCollection . values ] ( ) : IterableIterator < V > ; } export namespace ReadonlyKeyedMultiCollection { /**
     * A well-known symbol used to define the `ReadonlyKeyedMultiCollection#[ReadonlyKeyedMultiCollection.size]` property.
     */ export const size = Symbol . for ( "@esfx/collection-core!ReadonlyKeyedMultiCollection.size" ) ; /**
     * A well-known symbol used to define the `ReadonlyKeyedMultiCollection#[ReadonlyKeyedMultiCollection.has]` method.
     */ export const has = Symbol . for ( "@esfx/collection-core!ReadonlyKeyedMultiCollection.has" ) ; /**
     * A well-known symbol used to define the `ReadonlyKeyedMultiCollection#[ReadonlyKeyedMultiCollection.hasValue]` method.
     */ export const hasValue = Symbol . for ( "@esfx/collection-core!ReadonlyKeyedMultiCollection.hasValue" ) ; /**
     * A well-known symbol used to define the `ReadonlyKeyedMultiCollection#[ReadonlyKeyedMultiCollection.get]` method.
     */ export const get = Symbol . for ( "@esfx/collection-core!ReadonlyKeyedMultiCollection.get" ) ; /**
     * A well-known symbol used to define the `ReadonlyKeyedMultiCollection#[ReadonlyKeyedMultiCollection.keys]` method.
     */ export const keys = Symbol . for ( "@esfx/collection-core!ReadonlyKeyedMultiCollection.keys" ) ; /**
     * A well-known symbol used to define the `ReadonlyKeyedMultiCollection#[ReadonlyKeyedMultiCollection.values]` method.
     */ export const values = Symbol . for ( "@esfx/collection-core!ReadonlyKeyedMultiCollection.values" ) ; deprecated export function isReadonlyKeyedMultiCollection < K , V > ( value ) ; deprecated export function isReadonlyKeyedMultiCollection ( value ) ; deprecated export function isReadonlyKeyedMultiCollection ( value ) { return ReadonlyKeyedMultiCollection . hasInstance ( value ) ; } export const name = "ReadonlyKeyedMultiCollection" ; /**
     * Tests whether a value supports the minimal representation of a `ReadonlyKeyedMultiCollection`.
     */ export function hasInstance < K , V > ( value ) ; /**
     * Tests whether a value supports the minimal representation of a `ReadonlyKeyedMultiCollection`.
     */ export function hasInstance ( value ) ; /**
     * Tests whether a value supports the minimal representation of a `ReadonlyKeyedMultiCollection`.
     */ export function hasInstance ( value ) { return isIterable ( value ) && ReadonlyKeyedMultiCollection . size in value && ReadonlyKeyedMultiCollection . has in value && ReadonlyKeyedMultiCollection . hasValue in value && ReadonlyKeyedMultiCollection . get in value && ReadonlyKeyedMultiCollection . keys in value && ReadonlyKeyedMultiCollection . values in value ; } } export interface KeyedMultiCollection < K , V > extends ReadonlyKeyedMultiCollection < K , V > { /**
     * Adds a value to the collection for the provided key.
     */ [ KeyedMultiCollection . add ] ( key , value ) : void ; returns [ KeyedMultiCollection . delete ] ( key ) : number ; returns [ KeyedMultiCollection . deleteValue ] ( key , value ) : boolean ; /**
     * Clears the collection.
     */ [ KeyedMultiCollection . clear ] ( ) : void ; } export namespace KeyedMultiCollection { export import size = ReadonlyKeyedMultiCollection . size ; export import has = ReadonlyKeyedMultiCollection . has ; export import hasValue = ReadonlyKeyedMultiCollection . hasValue ; export import get = ReadonlyKeyedMultiCollection . get ; export import keys = ReadonlyKeyedMultiCollection . keys ; export import values = ReadonlyKeyedMultiCollection . values ; export import isReadonlyKeyedMultiCollection = ReadonlyKeyedMultiCollection . isReadonlyKeyedMultiCollection ; /**
     * A well-known symbol used to define the `KeyedMultiCollection#[KeyedMultiCollection.add]` method.
     */ export const add = Symbol . for ( "@esfx/collection-core!KeyedMultiCollection.add" ) ; KeyedMultiCollection . delete = Symbol . for ( "@esfx/collection-core!KeyedMultiCollection.delete" ) as typeof KeyedMultiCollection . delete ; /**
     * A well-known symbol used to define the `KeyedMultiCollection#[KeyedMultiCollection.deleteValue]` method.
     */ export const deleteValue = Symbol . for ( "@esfx/collection-core!KeyedMultiCollection.deleteValue" ) ; /**
     * A well-known symbol used to define the `KeyedMultiCollection#[KeyedMultiCollection.clear]` method.
     */ export const clear = Symbol . for ( "@esfx/collection-core!KeyedMultiCollection.clear" ) ; deprecated export function isKeyedMultiCollection < K , V > ( value ) ; deprecated export function isKeyedMultiCollection ( value ) ; deprecated export function isKeyedMultiCollection ( value ) { return KeyedMultiCollection . hasInstance ( value ) ; } export const name = "KeyedMultiCollection" ; /**
     * Tests whether a value supports the minimal representation of a `KeyedMultiCollection`.
     */ export function hasInstance < K , V > ( value ) ; /**
     * Tests whether a value supports the minimal representation of a `KeyedMultiCollection`.
     */ export function hasInstance ( value ) ; /**
     * Tests whether a value supports the minimal representation of a `KeyedMultiCollection`.
     */ export function hasInstance ( value ) { return ReadonlyKeyedMultiCollection . hasInstance ( value ) && KeyedMultiCollection . add in value && KeyedMultiCollection . delete in value && KeyedMultiCollection . deleteValue in value && KeyedMultiCollection . clear in value ; } } export declare namespace KeyedMultiCollection { /**
     * A well-known symbol used to define the `KeyedMultiCollection#[KeyedMultiCollection.delete]` method.
     */ const _delete ; export { _delete as delete } ; } deprecateProperty ( ReadonlyCollection , "isReadonlyCollection" , "Use 'ReadonlyCollection.hasInstance' instead." ) ; deprecateProperty ( Collection , "isReadonlyCollection" , "Use 'ReadonlyCollection.hasInstance' instead." ) ; deprecateProperty ( Collection , "isCollection" , "Use 'Collection.hasInstance' instead." ) ; deprecateProperty ( ReadonlyIndexedCollection , "isReadonlyCollection" , "Use 'ReadonlyCollection.hasInstance' instead." ) ; deprecateProperty ( ReadonlyIndexedCollection , "isReadonlyIndexedCollection" , "Use 'ReadonlyIndexedCollection.hasInstance' instead." ) ; deprecateProperty ( FixedSizeIndexedCollection , "isReadonlyCollection" , "Use 'ReadonlyCollection.hasInstance' instead." ) ; deprecateProperty ( FixedSizeIndexedCollection , "isReadonlyIndexedCollection" , "Use 'ReadonlyIndexedCollection.hasInstance' instead." ) ; deprecateProperty ( FixedSizeIndexedCollection , "isFixedSizeIndexedCollection" , "Use 'FixedSizeIndexedCollection.hasInstance' instead." ) ; deprecateProperty ( IndexedCollection , "isReadonlyCollection" , "Use 'ReadonlyCollection.hasInstance' instead." ) ; deprecateProperty ( IndexedCollection , "isReadonlyIndexedCollection" , "Use 'ReadonlyIndexedCollection.hasInstance' instead." ) ; deprecateProperty ( IndexedCollection , "isFixedSizeIndexedCollection" , "Use 'FixedSizeIndexedCollection.hasInstance' instead." ) ; deprecateProperty ( IndexedCollection , "isCollection" , "Use 'Collection.hasInstance' instead." ) ; deprecateProperty ( IndexedCollection , "isIndexedCollection" , "Use 'IndexedCollection.hasInstance' instead." ) ; deprecateProperty ( ReadonlyKeyedCollection , "isReadonlyKeyedCollection" , "Use 'ReadonlyKeyedCollection.hasInstance' instead." ) ; deprecateProperty ( KeyedCollection , "isReadonlyKeyedCollection" , "Use 'ReadonlyKeyedCollection.hasInstance' instead." ) ; deprecateProperty ( KeyedCollection , "isKeyedCollection" , "Use 'KeyedCollection.hasInstance' instead." ) ; deprecateProperty ( ReadonlyKeyedMultiCollection , "isReadonlyKeyedMultiCollection" , "Use 'ReadonlyKeyedMultiCollection.hasInstance' instead." ) ; deprecateProperty ( KeyedMultiCollection , "isReadonlyKeyedMultiCollection" , "Use 'ReadonlyKeyedMultiCollection.hasInstance' instead." ) ; deprecateProperty ( KeyedMultiCollection , "isKeyedMultiCollection" , "Use 'KeyedMultiCollection.hasInstance' instead." ) ;