芝麻web文件管理V1.00
编辑当前文件:/home/freeclou/app.optimyar.com/backend/node_modules/immutable/dist/immutable.d.ts
/** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /** * Immutable data encourages pure functions (data-in, data-out) and lends itself * to much simpler application development and enabling techniques from * functional programming such as lazy evaluation. * * While designed to bring these powerful functional concepts to JavaScript, it * presents an Object-Oriented API familiar to Javascript engineers and closely * mirroring that of Array, Map, and Set. It is easy and efficient to convert to * and from plain Javascript types. * Note: all examples are presented in [ES6][]. To run in all browsers, they * need to be translated to ES3. For example: * * // ES6 * foo.map(x => x * x); * // ES3 * foo.map(function (x) { return x * x; }); * * [ES6]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla */ declare module Immutable { /** * Deeply converts plain JS objects and arrays to Immutable Maps and Lists. * * If a `reviver` is optionally provided, it will be called with every * collection as a Seq (beginning with the most nested collections * and proceeding to the top-level collection itself), along with the key * refering to each collection and the parent JS object provided as `this`. * For the top level, object, the key will be `""`. This `reviver` is expected * to return a new Immutable Iterable, allowing for custom conversions from * deep JS objects. * * This example converts JSON to List and OrderedMap: * * Immutable.fromJS({a: {b: [10, 20, 30]}, c: 40}, function (key, value) { * var isIndexed = Immutable.Iterable.isIndexed(value); * return isIndexed ? value.toList() : value.toOrderedMap(); * }); * * // true, "b", {b: [10, 20, 30]} * // false, "a", {a: {b: [10, 20, 30]}, c: 40} * // false, "", {"": {a: {b: [10, 20, 30]}, c: 40}} * * If `reviver` is not provided, the default behavior will convert Arrays into * Lists and Objects into Maps. * * `reviver` acts similarly to the [same parameter in `JSON.parse`][1]. * * `Immutable.fromJS` is conservative in its conversion. It will only convert * arrays which pass `Array.isArray` to Lists, and only raw objects (no custom * prototype) to Map. * * Keep in mind, when using JS objects to construct Immutable Maps, that * JavaScript Object properties are always strings, even if written in a * quote-less shorthand, while Immutable Maps accept keys of any type. * * ```js * var obj = { 1: "one" }; * Object.keys(obj); // [ "1" ] * obj["1"]; // "one" * obj[1]; // "one" * * var map = Map(obj); * map.get("1"); // "one" * map.get(1); // undefined * ``` * * Property access for JavaScript Objects first converts the key to a string, * but since Immutable Map keys can be of any type the argument to `get()` is * not altered. * * [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Example.3A_Using_the_reviver_parameter * "Using the reviver parameter" */ export function fromJS( json: any, reviver?: (k: any, v: Iterable
) => any ): any; /** * Value equality check with semantics similar to `Object.is`, but treats * Immutable `Iterable`s as values, equal if the second `Iterable` includes * equivalent values. * * It's used throughout Immutable when checking for equality, including `Map` * key equality and `Set` membership. * * var map1 = Immutable.Map({a:1, b:1, c:1}); * var map2 = Immutable.Map({a:1, b:1, c:1}); * assert(map1 !== map2); * assert(Object.is(map1, map2) === false); * assert(Immutable.is(map1, map2) === true); * * Note: Unlike `Object.is`, `Immutable.is` assumes `0` and `-0` are the same * value, matching the behavior of ES6 Map key equality. */ export function is(first: any, second: any): boolean; /** * Lists are ordered indexed dense collections, much like a JavaScript * Array. * * Lists are immutable and fully persistent with O(log32 N) gets and sets, * and O(1) push and pop. * * Lists implement Deque, with efficient addition and removal from both the * end (`push`, `pop`) and beginning (`unshift`, `shift`). * * Unlike a JavaScript Array, there is no distinction between an * "unset" index and an index set to `undefined`. `List#forEach` visits all * indices from 0 to size, regardless of whether they were explicitly defined. */ export module List { /** * True if the provided value is a List */ function isList(maybeList: any): boolean; /** * Creates a new List containing `values`. */ function of
(...values: T[]): List
; } /** * Create a new immutable List containing the values of the provided * iterable-like. */ export function List
(): List
; export function List
(iter: Iterable.Indexed
): List
; export function List
(iter: Iterable.Set
): List
; export function List
(iter: Iterable.Keyed
): List*[K,V]*/any>; export function List
(array: Array
): List
; export function List
(iterator: Iterator
): List
; export function List
(iterable: /*Iterable
*/Object): List
; export interface List
extends Collection.Indexed
{ // Persistent changes /** * Returns a new List which includes `value` at `index`. If `index` already * exists in this List, it will be replaced. * * `index` may be a negative number, which indexes back from the end of the * List. `v.set(-1, "value")` sets the last item in the List. * * If `index` larger than `size`, the returned List's `size` will be large * enough to include the `index`. */ set(index: number, value: T): List
; /** * Returns a new List which excludes this `index` and with a size 1 less * than this List. Values at indices above `index` are shifted down by 1 to * fill the position. * * This is synonymous with `list.splice(index, 1)`. * * `index` may be a negative number, which indexes back from the end of the * List. `v.delete(-1)` deletes the last item in the List. * * Note: `delete` cannot be safely used in IE8 * @alias remove */ delete(index: number): List
; remove(index: number): List
; /** * Returns a new List with `value` at `index` with a size 1 more than this * List. Values at indices above `index` are shifted over by 1. * * This is synonymous with `list.splice(index, 0, value) */ insert(index: number, value: T): List
; /** * Returns a new List with 0 size and no values. */ clear(): List
; /** * Returns a new List with the provided `values` appended, starting at this * List's `size`. */ push(...values: T[]): List
; /** * Returns a new List with a size ones less than this List, excluding * the last index in this List. * * Note: this differs from `Array#pop` because it returns a new * List rather than the removed value. Use `last()` to get the last value * in this List. */ pop(): List
; /** * Returns a new List with the provided `values` prepended, shifting other * values ahead to higher indices. */ unshift(...values: T[]): List
; /** * Returns a new List with a size ones less than this List, excluding * the first index in this List, shifting all other values to a lower index. * * Note: this differs from `Array#shift` because it returns a new * List rather than the removed value. Use `first()` to get the first * value in this List. */ shift(): List
; /** * Returns a new List with an updated value at `index` with the return * value of calling `updater` with the existing value, or `notSetValue` if * `index` was not set. If called with a single argument, `updater` is * called with the List itself. * * `index` may be a negative number, which indexes back from the end of the * List. `v.update(-1)` updates the last item in the List. * * @see `Map#update` */ update(updater: (value: List
) => List
): List
; update(index: number, updater: (value: T) => T): List
; update(index: number, notSetValue: T, updater: (value: T) => T): List
; /** * @see `Map#merge` */ merge(...iterables: Iterable.Indexed
[]): List
; merge(...iterables: Array
[]): List
; /** * @see `Map#mergeWith` */ mergeWith( merger: (previous?: T, next?: T, key?: number) => T, ...iterables: Iterable.Indexed
[] ): List
; mergeWith( merger: (previous?: T, next?: T, key?: number) => T, ...iterables: Array
[] ): List
; /** * @see `Map#mergeDeep` */ mergeDeep(...iterables: Iterable.Indexed
[]): List
; mergeDeep(...iterables: Array
[]): List
; /** * @see `Map#mergeDeepWith` */ mergeDeepWith( merger: (previous?: T, next?: T, key?: number) => T, ...iterables: Iterable.Indexed
[] ): List
; mergeDeepWith( merger: (previous?: T, next?: T, key?: number) => T, ...iterables: Array
[] ): List
; /** * Returns a new List with size `size`. If `size` is less than this * List's size, the new List will exclude values at the higher indices. * If `size` is greater than this List's size, the new List will have * undefined values for the newly available indices. * * When building a new List and the final size is known up front, `setSize` * used in conjunction with `withMutations` may result in the more * performant construction. */ setSize(size: number): List
; // Deep persistent changes /** * Returns a new List having set `value` at this `keyPath`. If any keys in * `keyPath` do not exist, a new immutable Map will be created at that key. * * Index numbers are used as keys to determine the path to follow in * the List. */ setIn(keyPath: Array
, value: any): List
; setIn(keyPath: Iterable
, value: any): List
; /** * Returns a new List having removed the value at this `keyPath`. If any * keys in `keyPath` do not exist, no change will occur. * * @alias removeIn */ deleteIn(keyPath: Array
): List
; deleteIn(keyPath: Iterable
): List
; removeIn(keyPath: Array
): List
; removeIn(keyPath: Iterable
): List
; /** * @see `Map#updateIn` */ updateIn( keyPath: Array
, updater: (value: any) => any ): List
; updateIn( keyPath: Array
, notSetValue: any, updater: (value: any) => any ): List
; updateIn( keyPath: Iterable
, updater: (value: any) => any ): List
; updateIn( keyPath: Iterable
, notSetValue: any, updater: (value: any) => any ): List
; /** * @see `Map#mergeIn` */ mergeIn( keyPath: Iterable
, ...iterables: Iterable.Indexed
[] ): List
; mergeIn( keyPath: Array
, ...iterables: Iterable.Indexed
[] ): List
; mergeIn( keyPath: Array
, ...iterables: Array
[] ): List
; /** * @see `Map#mergeDeepIn` */ mergeDeepIn( keyPath: Iterable
, ...iterables: Iterable.Indexed
[] ): List
; mergeDeepIn( keyPath: Array
, ...iterables: Iterable.Indexed
[] ): List
; mergeDeepIn( keyPath: Array
, ...iterables: Array
[] ): List
; // Transient changes /** * Note: Not all methods can be used on a mutable collection or within * `withMutations`! Only `set`, `push`, `pop`, `shift`, `unshift` and * `merge` may be used mutatively. * * @see `Map#withMutations` */ withMutations(mutator: (mutable: List
) => any): List
; /** * @see `Map#asMutable` */ asMutable(): List
; /** * @see `Map#asImmutable` */ asImmutable(): List
; } /** * Immutable Map is an unordered Iterable.Keyed of (key, value) pairs with * `O(log32 N)` gets and `O(log32 N)` persistent sets. * * Iteration order of a Map is undefined, however is stable. Multiple * iterations of the same Map will iterate in the same order. * * Map's keys can be of any type, and use `Immutable.is` to determine key * equality. This allows the use of any value (including NaN) as a key. * * Because `Immutable.is` returns equality based on value semantics, and * Immutable collections are treated as values, any Immutable collection may * be used as a key. * * Map().set(List.of(1), 'listofone').get(List.of(1)); * // 'listofone' * * Any JavaScript object may be used as a key, however strict identity is used * to evaluate key equality. Two similar looking objects will represent two * different keys. * * Implemented by a hash-array mapped trie. */ export module Map { /** * True if the provided value is a Map */ function isMap(maybeMap: any): boolean; /** * Creates a new Map from alternating keys and values */ function of(...keyValues: any[]): Map
; } /** * Creates a new Immutable Map. * * Created with the same key value pairs as the provided Iterable.Keyed or * JavaScript Object or expects an Iterable of [K, V] tuple entries. * * var newMap = Map({key: "value"}); * var newMap = Map([["key", "value"]]); * * Keep in mind, when using JS objects to construct Immutable Maps, that * JavaScript Object properties are always strings, even if written in a * quote-less shorthand, while Immutable Maps accept keys of any type. * * ```js * var obj = { 1: "one" }; * Object.keys(obj); // [ "1" ] * obj["1"]; // "one" * obj[1]; // "one" * * var map = Map(obj); * map.get("1"); // "one" * map.get(1); // undefined * ``` * * Property access for JavaScript Objects first converts the key to a string, * but since Immutable Map keys can be of any type the argument to `get()` is * not altered. */ export function Map
(): Map
; export function Map
(iter: Iterable.Keyed
): Map
; export function Map
(iter: Iterable
>): Map
; export function Map
(array: Array*[K,V]*/Array
>): Map
; export function Map
(obj: {[key: string]: V}): Map
; export function Map
(iterator: Iterator*[K,V]*/Array
>): Map
; export function Map
(iterable: /*Iterable<[K,V]>*/Object): Map
; export interface Map
extends Collection.Keyed
{ // Persistent changes /** * Returns a new Map also containing the new key, value pair. If an equivalent * key already exists in this Map, it will be replaced. */ set(key: K, value: V): Map
; /** * Returns a new Map which excludes this `key`. * * Note: `delete` cannot be safely used in IE8, but is provided to mirror * the ES6 collection API. * @alias remove */ delete(key: K): Map
; remove(key: K): Map
; /** * Returns a new Map containing no keys or values. */ clear(): Map
; /** * Returns a new Map having updated the value at this `key` with the return * value of calling `updater` with the existing value, or `notSetValue` if * the key was not set. If called with only a single argument, `updater` is * called with the Map itself. * * Equivalent to: `map.set(key, updater(map.get(key, notSetValue)))`. */ update(updater: (value: Map
) => Map
): Map
; update(key: K, updater: (value: V) => V): Map
; update(key: K, notSetValue: V, updater: (value: V) => V): Map
; /** * Returns a new Map resulting from merging the provided Iterables * (or JS objects) into this Map. In other words, this takes each entry of * each iterable and sets it on this Map. * * If any of the values provided to `merge` are not Iterable (would return * false for `Immutable.Iterable.isIterable`) then they are deeply converted * via `Immutable.fromJS` before being merged. However, if the value is an * Iterable but includes non-iterable JS objects or arrays, those nested * values will be preserved. * * var x = Immutable.Map({a: 10, b: 20, c: 30}); * var y = Immutable.Map({b: 40, a: 50, d: 60}); * x.merge(y) // { a: 50, b: 40, c: 30, d: 60 } * y.merge(x) // { b: 20, a: 10, d: 60, c: 30 } * */ merge(...iterables: Iterable
[]): Map
; merge(...iterables: {[key: string]: V}[]): Map
; /** * Like `merge()`, `mergeWith()` returns a new Map resulting from merging * the provided Iterables (or JS objects) into this Map, but uses the * `merger` function for dealing with conflicts. * * var x = Immutable.Map({a: 10, b: 20, c: 30}); * var y = Immutable.Map({b: 40, a: 50, d: 60}); * x.mergeWith((prev, next) => prev / next, y) // { a: 0.2, b: 0.5, c: 30, d: 60 } * y.mergeWith((prev, next) => prev / next, x) // { b: 2, a: 5, d: 60, c: 30 } * */ mergeWith( merger: (previous?: V, next?: V, key?: K) => V, ...iterables: Iterable
[] ): Map
; mergeWith( merger: (previous?: V, next?: V, key?: K) => V, ...iterables: {[key: string]: V}[] ): Map
; /** * Like `merge()`, but when two Iterables conflict, it merges them as well, * recursing deeply through the nested data. * * var x = Immutable.fromJS({a: { x: 10, y: 10 }, b: { x: 20, y: 50 } }); * var y = Immutable.fromJS({a: { x: 2 }, b: { y: 5 }, c: { z: 3 } }); * x.mergeDeep(y) // {a: { x: 2, y: 10 }, b: { x: 20, y: 5 }, c: { z: 3 } } * */ mergeDeep(...iterables: Iterable
[]): Map
; mergeDeep(...iterables: {[key: string]: V}[]): Map
; /** * Like `mergeDeep()`, but when two non-Iterables conflict, it uses the * `merger` function to determine the resulting value. * * var x = Immutable.fromJS({a: { x: 10, y: 10 }, b: { x: 20, y: 50 } }); * var y = Immutable.fromJS({a: { x: 2 }, b: { y: 5 }, c: { z: 3 } }); * x.mergeDeepWith((prev, next) => prev / next, y) * // {a: { x: 5, y: 10 }, b: { x: 20, y: 10 }, c: { z: 3 } } * */ mergeDeepWith( merger: (previous?: V, next?: V, key?: K) => V, ...iterables: Iterable
[] ): Map
; mergeDeepWith( merger: (previous?: V, next?: V, key?: K) => V, ...iterables: {[key: string]: V}[] ): Map
; // Deep persistent changes /** * Returns a new Map having set `value` at this `keyPath`. If any keys in * `keyPath` do not exist, a new immutable Map will be created at that key. */ setIn(keyPath: Array
, value: any): Map
; setIn(KeyPath: Iterable
, value: any): Map
; /** * Returns a new Map having removed the value at this `keyPath`. If any keys * in `keyPath` do not exist, no change will occur. * * @alias removeIn */ deleteIn(keyPath: Array
): Map
; deleteIn(keyPath: Iterable
): Map
; removeIn(keyPath: Array
): Map
; removeIn(keyPath: Iterable
): Map
; /** * Returns a new Map having applied the `updater` to the entry found at the * keyPath. * * If any keys in `keyPath` do not exist, new Immutable `Map`s will * be created at those keys. If the `keyPath` does not already contain a * value, the `updater` function will be called with `notSetValue`, if * provided, otherwise `undefined`. * * var data = Immutable.fromJS({ a: { b: { c: 10 } } }); * data = data.updateIn(['a', 'b', 'c'], val => val * 2); * // { a: { b: { c: 20 } } } * * If the `updater` function returns the same value it was called with, then * no change will occur. This is still true if `notSetValue` is provided. * * var data1 = Immutable.fromJS({ a: { b: { c: 10 } } }); * data2 = data1.updateIn(['x', 'y', 'z'], 100, val => val); * assert(data2 === data1); * */ updateIn( keyPath: Array
, updater: (value: any) => any ): Map
; updateIn( keyPath: Array
, notSetValue: any, updater: (value: any) => any ): Map
; updateIn( keyPath: Iterable
, updater: (value: any) => any ): Map
; updateIn( keyPath: Iterable
, notSetValue: any, updater: (value: any) => any ): Map
; /** * A combination of `updateIn` and `merge`, returning a new Map, but * performing the merge at a point arrived at by following the keyPath. * In other words, these two lines are equivalent: * * x.updateIn(['a', 'b', 'c'], abc => abc.merge(y)); * x.mergeIn(['a', 'b', 'c'], y); * */ mergeIn( keyPath: Iterable
, ...iterables: Iterable
[] ): Map
; mergeIn( keyPath: Array
, ...iterables: Iterable
[] ): Map
; mergeIn( keyPath: Array
, ...iterables: {[key: string]: V}[] ): Map
; /** * A combination of `updateIn` and `mergeDeep`, returning a new Map, but * performing the deep merge at a point arrived at by following the keyPath. * In other words, these two lines are equivalent: * * x.updateIn(['a', 'b', 'c'], abc => abc.mergeDeep(y)); * x.mergeDeepIn(['a', 'b', 'c'], y); * */ mergeDeepIn( keyPath: Iterable
, ...iterables: Iterable
[] ): Map
; mergeDeepIn( keyPath: Array
, ...iterables: Iterable
[] ): Map
; mergeDeepIn( keyPath: Array
, ...iterables: {[key: string]: V}[] ): Map
; // Transient changes /** * Every time you call one of the above functions, a new immutable Map is * created. If a pure function calls a number of these to produce a final * return value, then a penalty on performance and memory has been paid by * creating all of the intermediate immutable Maps. * * If you need to apply a series of mutations to produce a new immutable * Map, `withMutations()` creates a temporary mutable copy of the Map which * can apply mutations in a highly performant manner. In fact, this is * exactly how complex mutations like `merge` are done. * * As an example, this results in the creation of 2, not 4, new Maps: * * var map1 = Immutable.Map(); * var map2 = map1.withMutations(map => { * map.set('a', 1).set('b', 2).set('c', 3); * }); * assert(map1.size === 0); * assert(map2.size === 3); * * Note: Not all methods can be used on a mutable collection or within * `withMutations`! Only `set` and `merge` may be used mutatively. * */ withMutations(mutator: (mutable: Map
) => any): Map
; /** * Another way to avoid creation of intermediate Immutable maps is to create * a mutable copy of this collection. Mutable copies *always* return `this`, * and thus shouldn't be used for equality. Your function should never return * a mutable copy of a collection, only use it internally to create a new * collection. If possible, use `withMutations` as it provides an easier to * use API. * * Note: if the collection is already mutable, `asMutable` returns itself. * * Note: Not all methods can be used on a mutable collection or within * `withMutations`! Only `set` and `merge` may be used mutatively. */ asMutable(): Map
; /** * The yin to `asMutable`'s yang. Because it applies to mutable collections, * this operation is *mutable* and returns itself. Once performed, the mutable * copy has become immutable and can be safely returned from a function. */ asImmutable(): Map
; } /** * A type of Map that has the additional guarantee that the iteration order of * entries will be the order in which they were set(). * * The iteration behavior of OrderedMap is the same as native ES6 Map and * JavaScript Object. * * Note that `OrderedMap` are more expensive than non-ordered `Map` and may * consume more memory. `OrderedMap#set` is amortized O(log32 N), but not * stable. */ export module OrderedMap { /** * True if the provided value is an OrderedMap. */ function isOrderedMap(maybeOrderedMap: any): boolean; } /** * Creates a new Immutable OrderedMap. * * Created with the same key value pairs as the provided Iterable.Keyed or * JavaScript Object or expects an Iterable of [K, V] tuple entries. * * The iteration order of key-value pairs provided to this constructor will * be preserved in the OrderedMap. * * var newOrderedMap = OrderedMap({key: "value"}); * var newOrderedMap = OrderedMap([["key", "value"]]); * */ export function OrderedMap
(): OrderedMap
; export function OrderedMap
(iter: Iterable.Keyed
): OrderedMap
; export function OrderedMap
(iter: Iterable
>): OrderedMap
; export function OrderedMap
(array: Array*[K,V]*/Array
>): OrderedMap
; export function OrderedMap
(obj: {[key: string]: V}): OrderedMap
; export function OrderedMap
(iterator: Iterator*[K,V]*/Array
>): OrderedMap
; export function OrderedMap
(iterable: /*Iterable<[K,V]>*/Object): OrderedMap
; export interface OrderedMap
extends Map
{} /** * A Collection of unique values with `O(log32 N)` adds and has. * * When iterating a Set, the entries will be (value, value) pairs. Iteration * order of a Set is undefined, however is stable. Multiple iterations of the * same Set will iterate in the same order. * * Set values, like Map keys, may be of any type. Equality is determined using * `Immutable.is`, enabling Sets to uniquely include other Immutable * collections, custom value types, and NaN. */ export module Set { /** * True if the provided value is a Set */ function isSet(maybeSet: any): boolean; /** * Creates a new Set containing `values`. */ function of
(...values: T[]): Set
; /** * `Set.fromKeys()` creates a new immutable Set containing the keys from * this Iterable or JavaScript Object. */ function fromKeys
(iter: Iterable
): Set
; function fromKeys(obj: {[key: string]: any}): Set
; } /** * Create a new immutable Set containing the values of the provided * iterable-like. */ export function Set
(): Set
; export function Set
(iter: Iterable.Set
): Set
; export function Set
(iter: Iterable.Indexed
): Set
; export function Set
(iter: Iterable.Keyed
): Set*[K,V]*/any>; export function Set
(array: Array
): Set
; export function Set
(iterator: Iterator
): Set
; export function Set
(iterable: /*Iterable
*/Object): Set
; export interface Set
extends Collection.Set
{ // Persistent changes /** * Returns a new Set which also includes this value. */ add(value: T): Set
; /** * Returns a new Set which excludes this value. * * Note: `delete` cannot be safely used in IE8 * @alias remove */ delete(value: T): Set
; remove(value: T): Set
; /** * Returns a new Set containing no values. */ clear(): Set
; /** * Returns a Set including any value from `iterables` that does not already * exist in this Set. * @alias merge */ union(...iterables: Iterable
[]): Set
; union(...iterables: Array
[]): Set
; merge(...iterables: Iterable
[]): Set
; merge(...iterables: Array
[]): Set
; /** * Returns a Set which has removed any values not also contained * within `iterables`. */ intersect(...iterables: Iterable
[]): Set
; intersect(...iterables: Array
[]): Set
; /** * Returns a Set excluding any values contained within `iterables`. */ subtract(...iterables: Iterable
[]): Set
; subtract(...iterables: Array
[]): Set
; // Transient changes /** * Note: Not all methods can be used on a mutable collection or within * `withMutations`! Only `add` may be used mutatively. * * @see `Map#withMutations` */ withMutations(mutator: (mutable: Set
) => any): Set
; /** * @see `Map#asMutable` */ asMutable(): Set
; /** * @see `Map#asImmutable` */ asImmutable(): Set
; } /** * A type of Set that has the additional guarantee that the iteration order of * values will be the order in which they were `add`ed. * * The iteration behavior of OrderedSet is the same as native ES6 Set. * * Note that `OrderedSet` are more expensive than non-ordered `Set` and may * consume more memory. `OrderedSet#add` is amortized O(log32 N), but not * stable. */ export module OrderedSet { /** * True if the provided value is an OrderedSet. */ function isOrderedSet(maybeOrderedSet: any): boolean; /** * Creates a new OrderedSet containing `values`. */ function of
(...values: T[]): OrderedSet
; /** * `OrderedSet.fromKeys()` creates a new immutable OrderedSet containing * the keys from this Iterable or JavaScript Object. */ function fromKeys