芝麻web文件管理V1.00
编辑当前文件:/home/rejoandoctor/public_html/node_modules/immutable/dist/immutable.js.flow
/** * This file provides type definitions for use with the Flow type checker. * * An important caveat when using these definitions is that the types for * `Collection.Keyed`, `Collection.Indexed`, `Seq.Keyed`, and so on are stubs. * When referring to those types, you can get the proper definitions by * importing the types `KeyedCollection`, `IndexedCollection`, `KeyedSeq`, etc. * For example, * * import { Seq } from 'immutable' * import type { IndexedCollection, IndexedSeq } from 'immutable' * * const someSeq: IndexedSeq
= Seq.Indexed.of(1, 2, 3) * * function takesASeq
>(iter: TS): TS { * return iter.butLast() * } * * takesASeq(someSeq) * * @flow strict */ // Helper type that represents plain objects allowed as arguments to // some constructors and functions. type PlainObjInput
= { +[key: K]: V, __proto__: null }; type K
= $Keys
; // Helper types to extract the "keys" and "values" use by the *In() methods. type $KeyOf
= $Call< (
(?_Collection
) => K) & (
(?$ReadOnlyArray
) => number) & (
(?RecordInstance
| T) => $Keys
) & (
(T) => $Keys
), C >; type $ValOf
> = $Call< (
(?_Collection
) => V) & (
(?$ReadOnlyArray
) => T) & (
>(?RecordInstance
| T, K) => $ElementType
) & (
(T) => $Values
), C, K >; type $IterableOf
= $Call< (
| IndexedCollection
| SetCollection
>( V ) => Iterable<$ValOf
>) & (< V: | KeyedCollection
| RecordInstance
| PlainObjInput
>( V ) => Iterable<[$KeyOf
, $ValOf
]>), C >; declare class _Collection
implements ValueObject { equals(other: mixed): boolean; hashCode(): number; get(key: K, ..._: []): V | void; get
(key: K, notSetValue: NSV): V | NSV; has(key: K): boolean; includes(value: V): boolean; contains(value: V): boolean; first
(notSetValue?: NSV): V | NSV; last
(notSetValue?: NSV): V | NSV; hasIn(keyPath: Iterable
): boolean; getIn(keyPath: [], notSetValue?: mixed): this; getIn
(keyPath: [K], notSetValue: NSV): V | NSV; getIn
>( keyPath: [K, K2], notSetValue: NSV ): $ValOf
| NSV; getIn
, K3: $KeyOf<$ValOf
>>( keyPath: [K, K2, K3], notSetValue: NSV ): $ValOf<$ValOf
, K3> | NSV; getIn< NSV, K2: $KeyOf
, K3: $KeyOf<$ValOf
>, K4: $KeyOf<$ValOf<$ValOf
, K3>> >( keyPath: [K, K2, K3, K4], notSetValue: NSV ): $ValOf<$ValOf<$ValOf
, K3>, K4> | NSV; getIn< NSV, K2: $KeyOf
, K3: $KeyOf<$ValOf
>, K4: $KeyOf<$ValOf<$ValOf
, K3>>, K5: $KeyOf<$ValOf<$ValOf<$ValOf
, K3>, K4>> >( keyPath: [K, K2, K3, K4, K5], notSetValue: NSV ): $ValOf<$ValOf<$ValOf<$ValOf
, K3>, K4>, K5> | NSV; update
(updater: (value: this) => U): U; toJS(): Array
| { [key: string]: mixed }; toJSON(): Array
| { [key: string]: V }; toArray(): Array
| Array<[K, V]>; toObject(): { [key: string]: V }; toMap(): Map
; toOrderedMap(): OrderedMap
; toSet(): Set
; toOrderedSet(): OrderedSet
; toList(): List
; toStack(): Stack
; toSeq(): Seq
; toKeyedSeq(): KeyedSeq
; toIndexedSeq(): IndexedSeq
; toSetSeq(): SetSeq
; keys(): Iterator
; values(): Iterator
; entries(): Iterator<[K, V]>; keySeq(): IndexedSeq
; valueSeq(): IndexedSeq
; entrySeq(): IndexedSeq<[K, V]>; reverse(): this; sort(comparator?: (valueA: V, valueB: V) => number): this; sortBy
( comparatorValueMapper: (value: V, key: K, iter: this) => C, comparator?: (valueA: C, valueB: C) => number ): this; groupBy
( grouper: (value: V, key: K, iter: this) => G, context?: mixed ): KeyedSeq
; forEach( sideEffect: (value: V, key: K, iter: this) => any, context?: mixed ): number; slice(begin?: number, end?: number): this; rest(): this; butLast(): this; skip(amount: number): this; skipLast(amount: number): this; skipWhile( predicate: (value: V, key: K, iter: this) => mixed, context?: mixed ): this; skipUntil( predicate: (value: V, key: K, iter: this) => mixed, context?: mixed ): this; take(amount: number): this; takeLast(amount: number): this; takeWhile( predicate: (value: V, key: K, iter: this) => mixed, context?: mixed ): this; takeUntil( predicate: (value: V, key: K, iter: this) => mixed, context?: mixed ): this; filterNot( predicate: (value: V, key: K, iter: this) => mixed, context?: mixed ): this; reduce
( reducer: (reduction: R, value: V, key: K, iter: this) => R, initialReduction: R, context?: mixed ): R; reduce
(reducer: (reduction: V | R, value: V, key: K, iter: this) => R): R; reduceRight
( reducer: (reduction: R, value: V, key: K, iter: this) => R, initialReduction: R, context?: mixed ): R; reduceRight
( reducer: (reduction: V | R, value: V, key: K, iter: this) => R ): R; every( predicate: (value: V, key: K, iter: this) => mixed, context?: mixed ): boolean; some( predicate: (value: V, key: K, iter: this) => mixed, context?: mixed ): boolean; join(separator?: string): string; isEmpty(): boolean; count( predicate?: (value: V, key: K, iter: this) => mixed, context?: mixed ): number; countBy
( grouper: (value: V, key: K, iter: this) => G, context?: mixed ): Map
; find
( predicate: (value: V, key: K, iter: this) => mixed, context?: mixed, notSetValue?: NSV ): V | NSV; findLast
( predicate: (value: V, key: K, iter: this) => mixed, context?: mixed, notSetValue?: NSV ): V | NSV; findEntry(predicate: (value: V, key: K, iter: this) => mixed): [K, V] | void; findLastEntry( predicate: (value: V, key: K, iter: this) => mixed ): [K, V] | void; findKey( predicate: (value: V, key: K, iter: this) => mixed, context?: mixed ): K | void; findLastKey( predicate: (value: V, key: K, iter: this) => mixed, context?: mixed ): K | void; keyOf(searchValue: V): K | void; lastKeyOf(searchValue: V): K | void; max(comparator?: (valueA: V, valueB: V) => number): V; maxBy
( comparatorValueMapper: (value: V, key: K, iter: this) => C, comparator?: (valueA: C, valueB: C) => number ): V; min(comparator?: (valueA: V, valueB: V) => number): V; minBy
( comparatorValueMapper: (value: V, key: K, iter: this) => C, comparator?: (valueA: C, valueB: C) => number ): V; isSubset(iter: Iterable
): boolean; isSuperset(iter: Iterable
): boolean; } declare function isImmutable( maybeImmutable: mixed ): boolean %checks(maybeImmutable instanceof Collection); declare function isCollection( maybeCollection: mixed ): boolean %checks(maybeCollection instanceof Collection); declare function isKeyed( maybeKeyed: mixed ): boolean %checks(maybeKeyed instanceof KeyedCollection); declare function isIndexed( maybeIndexed: mixed ): boolean %checks(maybeIndexed instanceof IndexedCollection); declare function isAssociative( maybeAssociative: mixed ): boolean %checks(maybeAssociative instanceof KeyedCollection || maybeAssociative instanceof IndexedCollection); declare function isOrdered( maybeOrdered: mixed ): boolean %checks(maybeOrdered instanceof IndexedCollection || maybeOrdered instanceof OrderedMap || maybeOrdered instanceof OrderedSet); declare function isValueObject(maybeValue: mixed): boolean; declare function isSeq(maybeSeq: any): boolean %checks(maybeSeq instanceof Seq); declare function isList(maybeList: any): boolean %checks(maybeList instanceof List); declare function isMap(maybeMap: any): boolean %checks(maybeMap instanceof Map); declare function isOrderedMap( maybeOrderedMap: any ): boolean %checks(maybeOrderedMap instanceof OrderedMap); declare function isStack(maybeStack: any): boolean %checks(maybeStack instanceof Stack); declare function isSet(maybeSet: any): boolean %checks(maybeSet instanceof Set); declare function isOrderedSet( maybeOrderedSet: any ): boolean %checks(maybeOrderedSet instanceof OrderedSet); declare function isRecord( maybeRecord: any ): boolean %checks(maybeRecord instanceof Record); declare interface ValueObject { equals(other: mixed): boolean; hashCode(): number; } declare class Collection
extends _Collection
{ static Keyed: typeof KeyedCollection; static Indexed: typeof IndexedCollection; static Set: typeof SetCollection; static isCollection: typeof isCollection; static isKeyed: typeof isKeyed; static isIndexed: typeof isIndexed; static isAssociative: typeof isAssociative; static isOrdered: typeof isOrdered; } declare class KeyedCollection
extends Collection
{ static
( values?: Iterable<[K, V]> | PlainObjInput
): KeyedCollection
; toJS(): { [key: string]: mixed }; toJSON(): { [key: string]: V }; toArray(): Array<[K, V]>; @@iterator(): Iterator<[K, V]>; toSeq(): KeyedSeq
; flip(): KeyedCollection
; concat
( ...iters: Array
| PlainObjInput
> ): KeyedCollection
; filter(predicate: typeof Boolean): KeyedCollection
>; filter( predicate: (value: V, key: K, iter: this) => mixed, context?: mixed ): KeyedCollection
; partition( predicate: (value: V, key: K, iter: this) => mixed, context?: mixed ): [this, this]; map
( mapper: (value: V, key: K, iter: this) => M, context?: mixed ): KeyedCollection
; mapKeys
( mapper: (key: K, value: V, iter: this) => M, context?: mixed ): KeyedCollection
; mapEntries
( mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], context?: mixed ): KeyedCollection
; flatMap
( mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, context?: mixed ): KeyedCollection
; flatten(depth?: number): KeyedCollection
; flatten(shallow?: boolean): KeyedCollection
; } Collection.Keyed = KeyedCollection; declare class IndexedCollection<+T> extends Collection
{ static
(iter?: Iterable
): IndexedCollection
; toJS(): Array
; toJSON(): Array
; toArray(): Array
; @@iterator(): Iterator
; toSeq(): IndexedSeq
; fromEntrySeq
(): KeyedSeq
; interpose(separator: T): this; interleave(...collections: Iterable
[]): this; splice(index: number, removeNum: number, ...values: T[]): this; zip
(a: Iterable
, ..._: []): IndexedCollection<[T, A]>; zip
( a: Iterable
, b: Iterable
, ..._: [] ): IndexedCollection<[T, A, B]>; zip
( a: Iterable
, b: Iterable
, c: Iterable
, ..._: [] ): IndexedCollection<[T, A, B, C]>; zip
( a: Iterable
, b: Iterable
, c: Iterable
, d: Iterable
, ..._: [] ): IndexedCollection<[T, A, B, C, D]>; zip
( a: Iterable
, b: Iterable
, c: Iterable
, d: Iterable
, e: Iterable
, ..._: [] ): IndexedCollection<[T, A, B, C, D, E]>; zipAll
(a: Iterable
, ..._: []): IndexedCollection<[T | void, A | void]>; zipAll
( a: Iterable
, b: Iterable
, ..._: [] ): IndexedCollection<[T | void, A | void, B | void]>; zipAll
( a: Iterable
, b: Iterable
, c: Iterable
, ..._: [] ): IndexedCollection<[T | void, A | void, B | void, C | void]>; zipAll
( a: Iterable
, b: Iterable
, c: Iterable
, d: Iterable
, ..._: [] ): IndexedCollection<[T | void, A | void, B | void, C | void, D | void]>; zipAll
( a: Iterable
, b: Iterable
, c: Iterable
, d: Iterable
, e: Iterable
, ..._: [] ): IndexedCollection< [T | void, A | void, B | void, C | void, D | void, E | void] >; zipWith
( zipper: (value: T, a: A) => R, a: Iterable
, ..._: [] ): IndexedCollection
; zipWith
( zipper: (value: T, a: A, b: B) => R, a: Iterable
, b: Iterable
, ..._: [] ): IndexedCollection
; zipWith
( zipper: (value: T, a: A, b: B, c: C) => R, a: Iterable
, b: Iterable
, c: Iterable
, ..._: [] ): IndexedCollection
; zipWith
( zipper: (value: T, a: A, b: B, c: C, d: D) => R, a: Iterable
, b: Iterable
, c: Iterable
, d: Iterable
, ..._: [] ): IndexedCollection
; zipWith
( zipper: (value: T, a: A, b: B, c: C, d: D, e: E) => R, a: Iterable
, b: Iterable
, c: Iterable
, d: Iterable
, e: Iterable
, ..._: [] ): IndexedCollection
; indexOf(searchValue: T): number; lastIndexOf(searchValue: T): number; findIndex( predicate: (value: T, index: number, iter: this) => mixed, context?: mixed ): number; findLastIndex( predicate: (value: T, index: number, iter: this) => mixed, context?: mixed ): number; concat
(...iters: Array
| C>): IndexedCollection
; filter(predicate: typeof Boolean): IndexedCollection<$NonMaybeType
>; filter( predicate: (value: T, index: number, iter: this) => mixed, context?: mixed ): IndexedCollection
; partition( predicate: (value: T, index: number, iter: this) => mixed, context?: mixed ): [this, this]; map
( mapper: (value: T, index: number, iter: this) => M, context?: mixed ): IndexedCollection
; flatMap
( mapper: (value: T, index: number, iter: this) => Iterable
, context?: mixed ): IndexedCollection
; flatten(depth?: number): IndexedCollection
; flatten(shallow?: boolean): IndexedCollection
; } declare class SetCollection<+T> extends Collection
{ static
(iter?: Iterable
): SetCollection
; toJS(): Array
; toJSON(): Array
; toArray(): Array
; @@iterator(): Iterator
; toSeq(): SetSeq
; concat
(...collections: Iterable
[]): SetCollection
; // `filter`, `map` and `flatMap` cannot be defined further up the hierarchy, // because the implementation for `KeyedCollection` allows the value type to // change without constraining the key type. That does not work for // `SetCollection` - the value and key types *must* match. filter(predicate: typeof Boolean): SetCollection<$NonMaybeType
>; filter( predicate: (value: T, value: T, iter: this) => mixed, context?: mixed ): SetCollection
; partition( predicate: (value: T, value: T, iter: this) => mixed, context?: mixed ): [this, this]; map
( mapper: (value: T, value: T, iter: this) => M, context?: mixed ): SetCollection
; flatMap
( mapper: (value: T, value: T, iter: this) => Iterable
, context?: mixed ): SetCollection
; flatten(depth?: number): SetCollection
; flatten(shallow?: boolean): SetCollection
; } declare function isSeq(maybeSeq: mixed): boolean %checks(maybeSeq instanceof Seq); declare class Seq
extends _Collection
{ static Keyed: typeof KeyedSeq; static Indexed: typeof IndexedSeq; static Set: typeof SetSeq; static
(values: KeyedSeq
): KeyedSeq
; static
(values: SetSeq
): SetSeq
; static
(values: Iterable
): IndexedSeq
; static
(values?: PlainObjInput
): KeyedSeq
; static isSeq: typeof isSeq; size: number | void; cacheResult(): this; toSeq(): this; } declare class KeyedSeq
extends Seq
mixins KeyedCollection
{ static
( values?: Iterable<[K, V]> | PlainObjInput
): KeyedSeq
; // Override specialized return types flip(): KeyedSeq
; concat
( ...iters: Array
| PlainObjInput
> ): KeyedSeq
; filter(predicate: typeof Boolean): KeyedSeq
>; filter( predicate: (value: V, key: K, iter: this) => mixed, context?: mixed ): KeyedSeq
; partition( predicate: (value: V, key: K, iter: this) => mixed, context?: mixed ): [this, this]; map
( mapper: (value: V, key: K, iter: this) => M, context?: mixed ): KeyedSeq
; mapKeys
( mapper: (key: K, value: V, iter: this) => M, context?: mixed ): KeyedSeq
; mapEntries
( mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], context?: mixed ): KeyedSeq
; flatMap
( mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, context?: mixed ): KeyedSeq
; flatten(depth?: number): KeyedSeq
; flatten(shallow?: boolean): KeyedSeq
; } declare class IndexedSeq<+T> extends Seq
mixins IndexedCollection
{ static
(values?: Iterable
): IndexedSeq
; static of
(...values: T[]): IndexedSeq
; // Override specialized return types concat
(...iters: Array
| C>): IndexedSeq