Represents an ordered sequence of elements.

### Type parameters

- T

### Hierarchy

- Query<T>
  - OrderedQuery

### Implements

- Iterable<T>
- OrderedIterable<T>

## Index

### Constructors

- constructor

### Methods (Query)

- choose
- consume
- continuous
- empty
- from
- generate
- hierarchy
- if
- objectEntries
- objectKeys
- objectValues
- of
- once
- range
- repeat

### Methods (Scalar)

- average
- break
- copyTo
- corresponds
- correspondsBy
- count
- drain
- elementAt
- endsWith
- eval
- every
- first
- forEach
- includes
- includesSequence
- last
- max
- maxBy
- min
- minBy
- nth
- reduce
- reduceRight
- single
- some
- span
- startsWith
- sum
- toArray
- toLookup
- toMap
- toObject
- toSet
- unzip

### Methods (Subquery)

- append
- concat
- defaultIfEmpty
- distinct
- distinctBy
- do
- except
- exceptBy
- exclude
- expand
- filter
- filterBy
- filterDefined
- flatMap
- groupBy
- intersect
- intersectBy
- map
- pageBy
- patch
- prepend
- relativeComplement
- relativeComplementBy
- reverse
- scan
- scanRight
- select
- selectMany
- skip
- skipRight
- skipUntil
- skipWhile
- spanMap
- symmetricDifference
- symmetricDifferenceBy
- take
- takeRight
- takeUntil
- takeWhile
- tap
- through
- union
- unionBy
- where
- whereBy
- whereDefined
- xor
- xorBy

### Methods (Order)

- orderBy
- orderByDescending
- thenBy
- thenByDescending

### Methods (Join)

- fullJoin
- groupJoin
- join
- zip

### Methods (Hierarchy)

- toHierarchy

### Methods

- [OrderedIterable.thenBy]
- [Symbol.iterator]
- toJSON

## Constructors

### constructor

- new OrderedQuery(source: OrderedIterable<T>): OrderedQuery

- Overrides Query.constructor

  - Defined in query.ts:2270

  #### Parameters

  - source: OrderedIterable<T>

  #### Returns OrderedQuery

## Methods (Query)

### Static choose

- choose<K, V>(chooser: function, choices: Queryable<Choice<K, V>>, otherwise?: Queryable<V>): Query<V>

- Inherited from Query.choose

  - Defined in query.ts:296

  Creates a Query that iterates the elements from sources picked from a list based on the result of a lazily evaluated choice.

  category

    Query

  #### Type parameters

  - K
  - V

  #### Parameters

  - chooser: function —

    A callback used to choose a source.

    - - (): K

      - #### Returns K

  - choices: Queryable<Choice<K, V>> —

    A list of sources

  - Optional otherwise: Queryable<V> —

    A default source to use when another choice could not be made.

  #### Returns Query<V>

### Static consume

- consume<T>(iterator: Iterator<T>, options?: ConsumeOptions): Query<T>

- Inherited from Query.consume

  - Defined in query.ts:270

  Creates a Query that, when iterated, consumes the provided `Iterator`.

  category

    Query

  #### Type parameters

  - T

  #### Parameters

  - iterator: Iterator<T> —

    An `Iterator` object.

  - Optional options: ConsumeOptions

  #### Returns Query<T>

### Static continuous

- continuous<T>(value: T): Query<T>

- Inherited from Query.continuous

  - Defined in query.ts:237

  Creates a Query that repeats the provided value forever.

  category

    Query

  #### Type parameters

  - T

  #### Parameters

  - value: T —

    The value for each element of the Query.

  #### Returns Query<T>

### Static empty

- empty<T>(): Query<T>

- Inherited from Query.empty

  - Defined in query.ts:194

  Creates a Query with no elements.

  category

    Query

  #### Type parameters

  - T

  #### Returns Query<T>

### Static from

- from<TNode, T>(source: OrderedHierarchyIterable<TNode, T>): OrderedHierarchyQuery<TNode, T>
- from<TNode, T>(source: HierarchyIterable<TNode, T>): HierarchyQuery<TNode, T>
- from<T>(source: OrderedIterable<T>): OrderedQuery<T>
- from<T>(source: Queryable<T>): Query<T>
- from<TNode, T>(source: OrderedIterable<T>, hierarchy: HierarchyProvider<TNode>): OrderedHierarchyQuery<TNode, T>
- from<TNode, T>(source: Queryable<T>, hierarchy: HierarchyProvider<TNode>): HierarchyQuery<TNode, T>

- Inherited from Query.from

  - Defined in query.ts:136

  Creates a Query from a Queryable source.

  category

    Query

  #### Type parameters

  - TNode
  - T: TNode

  #### Parameters

  - source: OrderedHierarchyIterable<TNode, T> —

    An OrderedHierarchyIterable object.

  #### Returns OrderedHierarchyQuery<TNode, T>

- Inherited from Query.from

  - Defined in query.ts:143

  Creates a Query from a Queryable source.

  category

    Query

  #### Type parameters

  - TNode
  - T: TNode

  #### Parameters

  - source: HierarchyIterable<TNode, T> —

    An OrderedHierarchyIterable object.

  #### Returns HierarchyQuery<TNode, T>

- Inherited from Query.from

  - Defined in query.ts:150

  Creates a Query from a Queryable source.

  category

    Query

  #### Type parameters

  - T

  #### Parameters

  - source: OrderedIterable<T> —

    An OrderedHierarchyIterable object.

  #### Returns OrderedQuery<T>

- Inherited from Query.from

  - Defined in query.ts:157

  Creates a Query from a Queryable source.

  category

    Query

  #### Type parameters

  - T

  #### Parameters

  - source: Queryable<T> —

    An OrderedHierarchyIterable object.

  #### Returns Query<T>

- Inherited from Query.from

  - Defined in query.ts:165

  Creates a Query from a Queryable source.

  category

    Query

  #### Type parameters

  - TNode
  - T: TNode

  #### Parameters

  - source: OrderedIterable<T> —

    An OrderedHierarchyIterable object.

  - hierarchy: HierarchyProvider<TNode> —

    A HierarchyProvider object.

  #### Returns OrderedHierarchyQuery<TNode, T>

- Inherited from Query.from

  - Defined in query.ts:173

  Creates a Query from a Queryable source.

  category

    Query

  #### Type parameters

  - TNode
  - T: TNode

  #### Parameters

  - source: Queryable<T> —

    An OrderedHierarchyIterable object.

  - hierarchy: HierarchyProvider<TNode> —

    A HierarchyProvider object.

  #### Returns HierarchyQuery<TNode, T>

### Static generate

- generate<T>(count: number, generator: function): Query<T>

- Inherited from Query.generate

  - Defined in query.ts:249

  Creates a Query whose values are provided by a callback executed a provided number of times.

  category

    Query

  #### Type parameters

  - T

  #### Parameters

  - count: number —

    The number of times to execute the callback.

  - generator: function —

    The callback to execute.

    - - (offset: number): T

      - #### Parameters

        - offset: number

        #### Returns T

  #### Returns Query<T>

### Static hierarchy

- hierarchy<TNode, T>(root: T, hierarchy: HierarchyProvider<TNode>): HierarchyQuery<TNode, T>

- Inherited from Query.hierarchy

  - Defined in query.ts:260

  Creates a HierarchyQuery from a root node and a HierarchyProvider.

  category

    Query

  #### Type parameters

  - TNode
  - T: TNode

  #### Parameters

  - root: T —

    The root node of the hierarchy.

  - hierarchy: HierarchyProvider<TNode> —

    A HierarchyProvider object.

  #### Returns HierarchyQuery<TNode, T>

### Static if

- if<T>(condition: function, thenQueryable: Queryable<T>, elseQueryable?: Queryable<T>): Query<T>

- Inherited from Query.if

  - Defined in query.ts:283

  Creates a Query that iterates the elements from one of two sources based on the result of a lazily evaluated condition.

  category

    Query

  #### Type parameters

  - T

  #### Parameters

  - condition: function —

    A callback used to choose a source.

    - - (): boolean

      - #### Returns boolean

  - thenQueryable: Queryable<T> —

    The source to use when the callback evaluates to `true`.

  - Optional elseQueryable: Queryable<T> —

    The source to use when the callback evaluates to `false`.

  #### Returns Query<T>

### Static objectEntries

- objectEntries<T>(source: T): Query<KeyValuePair<T, Extract<keyof T, string>>>

- Inherited from Query.objectEntries

  - Defined in query.ts:326

  Creates a Query for the own property key-value pairs of an object.

  category

    Query

  #### Type parameters

  - T: object

  #### Parameters

  - source: T —

    An object.

  #### Returns Query<KeyValuePair<T, Extract<keyof T, string>>>

### Static objectKeys

- objectKeys<T>(source: T): Query<Extract<keyof T, string>>

- Inherited from Query.objectKeys

  - Defined in query.ts:306

  Creates a Query for the own property keys of an object.

  category

    Query

  #### Type parameters

  - T: object

  #### Parameters

  - source: T —

    An object.

  #### Returns Query<Extract<keyof T, string>>

### Static objectValues

- objectValues<T>(source: T): Query<T[Extract<keyof T, string>]>

- Inherited from Query.objectValues

  - Defined in query.ts:316

  Creates a Query for the own property values of an object.

  category

    Query

  #### Type parameters

  - T: object

  #### Parameters

  - source: T —

    An object.

  #### Returns Query<T[Extract<keyof T, string>]>

### Static of

- of<T>(...elements: T[]): Query<T>

- Inherited from Query.of

  - Defined in query.ts:184

  Creates a Query for the provided elements.

  category

    Query

  #### Type parameters

  - T

  #### Parameters

  - Rest ...elements: T[] —

    The elements of the Query.

  #### Returns Query<T>

### Static once

- once<T>(value: T): Query<T>

- Inherited from Query.once

  - Defined in query.ts:204

  Creates a Query over a single element.

  category

    Query

  #### Type parameters

  - T

  #### Parameters

  - value: T —

    The only element for the Query.

  #### Returns Query<T>

### Static range

- range(start: number, end: number, increment?: undefined | number): Query<number>

- Inherited from Query.range

  - Defined in query.ts:227

  Creates a Query over a range of numbers.

  category

    Query

  #### Parameters

  - start: number —

    The starting number of the range.

  - end: number —

    The ending number of the range.

  - Optional increment: undefined | number —

    The amount by which to change between each itereated value.

  #### Returns Query<number>

### Static repeat

- repeat<T>(value: T, count: number): Query<T>

- Inherited from Query.repeat

  - Defined in query.ts:215

  Creates a Query for a value repeated a provided number of times.

  category

    Query

  #### Type parameters

  - T

  #### Parameters

  - value: T —

    The value for each element of the Query.

  - count: number —

    The number of times to repeat the value.

  #### Returns Query<T>

## Methods (Scalar)

### average

- average(): T extends number ? number : never
- average(elementSelector: function): number

- Inherited from Query.average

  - Defined in query.ts:1418

  Computes the average for a series of numbers.

  category

    Scalar

  #### Returns T extends number ? number : never

- Inherited from Query.average

  - Defined in query.ts:1424

  Computes the average for a series of numbers.

  category

    Scalar

  #### Parameters

  - elementSelector: function
    - - (element: T): number

      - #### Parameters

        - element: T

        #### Returns number

### break

- break(predicate: function): [Query<T>, Query<T>]

- Inherited from Query.break

  - Defined in query.ts:1656

  Creates a tuple whose first element is a subquery containing the first span of elements that do not match the supplied predicate, and whose second element is a subquery containing the remaining elements.

  The first subquery is eagerly evaluated, while the second subquery is lazily evaluated.

  category

    Scalar

  #### Parameters

  - predicate: function —

    The predicate used to match elements.

    - - (element: T, offset: number): boolean

      - #### Parameters

        - element: T
        - offset: number

        #### Returns boolean

  #### Returns [Query<T>, Query<T>]

### copyTo

- copyTo<U>(dest: U, start?: undefined | number, count?: undefined | number): U

- Inherited from Query.copyTo

  - Defined in query.ts:1883

  Writes each element to a destination array.

  category

    Scalar

  #### Type parameters

  - U: WritableArrayLike<T>

  #### Parameters

  - dest: U —

    The destination array.

  - Optional start: undefined | number —

    The offset into the array at which to start writing.

  - Optional count: undefined | number —

    The number of elements to write to the array.

  #### Returns U

### corresponds

- corresponds(right: Queryable<T>, equaler?: EqualityComparison<T> | Equaler<T>): boolean
- corresponds<U>(right: Queryable<U>, equaler: function): boolean

- Inherited from Query.corresponds

  - Defined in query.ts:1468

  Computes a scalar value indicating whether every element in this Query corresponds to a matching element in another Queryable at the same position.

  category

    Scalar

  #### Parameters

  - right: Queryable<T> —

    A Queryable object.

  - Optional equaler: EqualityComparison<T> | Equaler<T> —

    An optional callback used to compare the equality of two elements.

  #### Returns boolean

- Inherited from Query.corresponds

  - Defined in query.ts:1477

  Computes a scalar value indicating whether every element in this Query corresponds to a matching element in another Queryable at the same position.

  category

    Scalar

  #### Type parameters

  - U

  #### Parameters

  - right: Queryable<U> —

    A Queryable object.

  - equaler: function —

    An optional callback used to compare the equality of two elements.

    - - (left: T, right: U): boolean

      - #### Parameters

        - left: T
        - right: U

        #### Returns boolean

### correspondsBy

- correspondsBy<K>(right: Queryable<T>, keySelector: function): boolean
- correspondsBy<U, K>(right: Queryable<U>, leftKeySelector: function, rightKeySelector: function, keyEqualer?: EqualityComparison<K> | Equaler<K>): boolean

- Inherited from Query.correspondsBy

  - Defined in query.ts:1490

  Computes a scalar value indicating whether every element in this Query corresponds to a matching element in another Queryable at the same position.

  category

    Scalar

  #### Type parameters

  - K

  #### Parameters

  - right: Queryable<T> —

    A Queryable object.

  - keySelector: function —

    A callback used to select the key for each element.

    - - (element: T): K

      - #### Parameters

        - element: T

        #### Returns K

  #### Returns boolean

- Inherited from Query.correspondsBy

  - Defined in query.ts:1501

  Computes a scalar value indicating whether the key for every element in this Query corresponds to a matching key in `right` at the same position.

  category

    Scalar

  #### Type parameters

  - U
  - K

  #### Parameters

  - right: Queryable<U> —

    A Queryable object.

  - leftKeySelector: function —

    A callback used to select the key for each element in this Query.

    - - (element: T): K

      - #### Parameters

        - element: T

        #### Returns K

  - rightKeySelector: function —

    A callback used to select the key for each element in `right`.

    - - (element: U): K

      - #### Parameters

        - element: U

        #### Returns K

  - Optional keyEqualer: EqualityComparison<K> | Equaler<K> —

    An optional callback used to compare the equality of two keys.

  #### Returns boolean

### count

- count(predicate?: undefined | function): number

- Inherited from Query.count

  - Defined in query.ts:1291

  Counts the number of elements in the Query, optionally filtering elements using the supplied callback.

  category

    Scalar

  #### Parameters

  - Optional predicate: undefined | function —

    An optional callback used to match each element.

  #### Returns number

### drain

- drain(): void

- Inherited from Query.drain

  - Defined in query.ts:1675

  Iterates over all of the elements in the Query, ignoring the results.

  category

    Scalar

  #### Returns void

### elementAt

- elementAt(offset: number): T | undefined

- Inherited from Query.elementAt

  - Defined in query.ts:1599

  Finds the value in the Query at the provided offset. A negative offset starts from the last element.

  category

    Scalar

  #### Parameters

  - offset: number —

    An offset.

  #### Returns T | undefined

### endsWith

- endsWith(right: Queryable<T>, equaler?: EqualityComparison<T> | Equaler<T>): boolean
- endsWith<U>(right: Queryable<U>, equaler: function): boolean

- Inherited from Query.endsWith

  - Defined in query.ts:1578

  Computes a scalar value indicating whether the elements of this Query end with the same sequence of elements in another Queryable.

  category

    Scalar

  #### Parameters

  - right: Queryable<T> —

    A Queryable object.

  - Optional equaler: EqualityComparison<T> | Equaler<T> —

    A callback used to compare the equality of two elements.

  #### Returns boolean

- Inherited from Query.endsWith

  - Defined in query.ts:1587

  Computes a scalar value indicating whether the elements of this Query end with the same sequence of elements in another Queryable.

  category

    Scalar

  #### Type parameters

  - U

  #### Parameters

  - right: Queryable<U> —

    A Queryable object.

  - equaler: function —

    A callback used to compare the equality of two elements.

    - - (left: T, right: U): boolean

      - #### Parameters

        - left: T
        - right: U

        #### Returns boolean

### eval

- eval(): QueryFlow<this, T>

- Inherited from Query.eval

  - Defined in query.ts:1683

  Eagerly evaluate the Query, returning a new Query.

  category

    Scalar

  #### Returns QueryFlow<this, T>

### every

- every<U>(predicate: function): boolean
- every(predicate: function): boolean

- Inherited from Query.every

  - Defined in query.ts:1447

  Computes a scalar value indicating whether all elements of the Query match the supplied callback.

  category

    Scalar

  #### Type parameters

  - U: T

  #### Parameters

  - predicate: function —

    A callback used to match each element.

    - - (element: T): boolean

      - #### Parameters

        - element: T

        #### Returns boolean

- Inherited from Query.every

  - Defined in query.ts:1455

  Computes a scalar value indicating whether all elements of the Query match the supplied callback.

  category

    Scalar

  #### Parameters

  - predicate: function —

    A callback used to match each element.

    - - (element: T): boolean

      - #### Parameters

        - element: T

        #### Returns boolean

### first

- first<U>(predicate: function): U | undefined
- first(predicate?: undefined | function): T | undefined

- Inherited from Query.first

  - Defined in query.ts:1302

  Gets the first element in the Query, optionally filtering elements using the supplied callback.

  category

    Scalar

  #### Type parameters

  - U: T

  #### Parameters

  - predicate: function —

    An optional callback used to match each element.

    - - (element: T): boolean

      - #### Parameters

        - element: T

        #### Returns boolean

  #### Returns U | undefined

- Inherited from Query.first

  - Defined in query.ts:1310

  Gets the first element in the Query, optionally filtering elements using the supplied callback.

  category

    Scalar

  #### Parameters

  - Optional predicate: undefined | function —

    An optional callback used to match each element.

  #### Returns T | undefined

### forEach

- forEach(callback: function): void

- Inherited from Query.forEach

  - Defined in query.ts:1667

  Invokes a callback for each element of the Query.

  category

    Scalar

  #### Parameters

  - callback: function —

    The callback to invoke.

    - - (element: T, offset: number): void

      - #### Parameters

        - element: T
        - offset: number

        #### Returns void

### includes

- includes(value: T, equaler?: EqualityComparison<T> | Equaler<T>): boolean
- includes<U>(value: U, equaler: function): boolean

- Inherited from Query.includes

  - Defined in query.ts:1513

  Computes a scalar value indicating whether the provided value is included in the Query.

  category

    Scalar

  #### Parameters

  - value: T —

    A value.

  - Optional equaler: EqualityComparison<T> | Equaler<T> —

    An optional callback used to compare the equality of two elements.

  #### Returns boolean

- Inherited from Query.includes

  - Defined in query.ts:1521

  Computes a scalar value indicating whether the provided value is included in the Query.

  category

    Scalar

  #### Type parameters

  - U

  #### Parameters

  - value: U —

    A value.

  - equaler: function —

    An optional callback used to compare the equality of two elements.

    - - (left: T, right: U): boolean

      - #### Parameters

        - left: T
        - right: U

        #### Returns boolean

### includesSequence

- includesSequence(right: Queryable<T>, equaler?: EqualityComparison<T> | Equaler<T>): boolean
- includesSequence<U>(right: Queryable<U>, equaler: function): boolean

- Inherited from Query.includesSequence

  - Defined in query.ts:1534

  Computes a scalar value indicating whether the elements of this Query include an exact sequence of elements from another Queryable.

  category

    Scalar

  #### Parameters

  - right: Queryable<T> —

    A Queryable object.

  - Optional equaler: EqualityComparison<T> | Equaler<T> —

    A callback used to compare the equality of two elements.

  #### Returns boolean

- Inherited from Query.includesSequence

  - Defined in query.ts:1543

  Computes a scalar value indicating whether the elements of this Query include an exact sequence of elements from another Queryable.

  category

    Scalar

  #### Type parameters

  - U

  #### Parameters

  - right: Queryable<U> —

    A Queryable object.

  - equaler: function —

    A callback used to compare the equality of two elements.

    - - (left: T, right: U): boolean

      - #### Parameters

        - left: T
        - right: U

        #### Returns boolean

### last

- last<U>(predicate: function): U | undefined
- last(predicate?: undefined | function): T | undefined

- Inherited from Query.last

  - Defined in query.ts:1322

  Gets the last element in the Query, optionally filtering elements using the supplied callback.

  category

    Scalar

  #### Type parameters

  - U: T

  #### Parameters

  - predicate: function —

    An optional callback used to match each element.

    - - (element: T): boolean

      - #### Parameters

        - element: T

        #### Returns boolean

  #### Returns U | undefined

- Inherited from Query.last

  - Defined in query.ts:1330

  Gets the last element in the Query, optionally filtering elements using the supplied callback.

  category

    Scalar

  #### Parameters

  - Optional predicate: undefined | function —

    An optional callback used to match each element.

  #### Returns T | undefined

### max

- max(comparer?: Comparison<T> | Comparer<T>): T | undefined

- Inherited from Query.max

  - Defined in query.ts:1382

  Gets the maximum element in the Query, optionally comparing elements using the supplied callback.

  category

    Scalar

  #### Parameters

  - Optional comparer: Comparison<T> | Comparer<T> —

    An optional callback used to compare two elements.

  #### Returns T | undefined

### maxBy

- maxBy<K>(keySelector: function, keyComparer?: Comparison<K> | Comparer<K>): T | undefined

- Inherited from Query.maxBy

  - Defined in query.ts:1393

  Gets the maximum element by its key in the Query, optionally comparing the keys of each element using the supplied callback.

  category

    Scalar

  #### Type parameters

  - K

  #### Parameters

  - keySelector: function —

    A callback used to choose the key to compare.

    - - (element: T): K

      - #### Parameters

        - element: T

        #### Returns K

  - Optional keyComparer: Comparison<K> | Comparer<K> —

    An optional callback used to compare the keys.

  #### Returns T | undefined

### min

- min(comparer?: Comparison<T> | Comparer<T>): T | undefined

- Inherited from Query.min

  - Defined in query.ts:1360

  Gets the minimum element in the Query, optionally comparing elements using the supplied callback.

  category

    Scalar

  #### Parameters

  - Optional comparer: Comparison<T> | Comparer<T> —

    An optional callback used to compare two elements.

  #### Returns T | undefined

### minBy

- minBy<K>(keySelector: function, keyComparer?: Comparison<K> | Comparer<K>): T | undefined

- Inherited from Query.minBy

  - Defined in query.ts:1371

  Gets the minimum element by its key in the Query, optionally comparing the keys of each element using the supplied callback.

  category

    Scalar

  #### Type parameters

  - K

  #### Parameters

  - keySelector: function —

    A callback used to choose the key to compare.

    - - (element: T): K

      - #### Parameters

        - element: T

        #### Returns K

  - Optional keyComparer: Comparison<K> | Comparer<K> —

    An optional callback used to compare the keys.

  #### Returns T | undefined

### nth

- nth(offset: number): T | undefined

- Inherited from Query.nth

  - Defined in query.ts:1612

  Finds the value in the Query at the provided offset. A negative offset starts from the last element.

  This is an alias for `elementAt`.

  category

    Scalar

  #### Parameters

  - offset: number —

    An offset.

  #### Returns T | undefined

### reduce

- reduce(accumulator: function): T
- reduce<U>(accumulator: function, seed: U, resultSelector?: undefined | function): U
- reduce<U, R>(accumulator: function, seed: U, resultSelector: function): R

- Inherited from Query.reduce

  - Defined in query.ts:1222

  Computes a scalar value by applying an accumulator callback over each element.

  category

    Scalar

  #### Parameters

  - accumulator: function —

    the callback used to compute the result.

    - - (current: T, element: T, offset: number): T

      - #### Parameters

        - current: T —

          The current accumulated value.

        - element: T —

          The value to accumulate.

        - offset: number —

          The offset from the start of the underlying Queryable.

        #### Returns T

- Inherited from Query.reduce

  - Defined in query.ts:1234

  Computes a scalar value by applying an accumulator callback over each element.

  category

    Scalar

  #### Type parameters

  - U

  #### Parameters

  - accumulator: function —

    the callback used to compute the result.

    - - (current: U, element: T, offset: number): U

      - #### Parameters

        - current: U —

          The current accumulated value.

        - element: T —

          The value to accumulate.

        - offset: number —

          The offset from the start of the underlying Queryable.

        #### Returns U

  - seed: U —

    An optional seed value.

  - Optional resultSelector: undefined | function —

    An optional callback used to compute the final result.

  #### Returns U

- Inherited from Query.reduce

  - Defined in query.ts:1247

  Computes a scalar value by applying an accumulator callback over each element.

  category

    Scalar

  #### Type parameters

  - U
  - R

  #### Parameters

  - accumulator: function —

    the callback used to compute the result.

    - - (current: U, element: T, offset: number): U

      - #### Parameters

        - current: U —

          The current accumulated value.

        - element: T —

          The value to accumulate.

        - offset: number —

          The offset from the start of the underlying Queryable.

        #### Returns U

  - seed: U —

    An optional seed value.

  - resultSelector: function —

    An optional callback used to compute the final result.

    - - (result: U, count: number): R

      - #### Parameters

        - result: U
        - count: number

        #### Returns R

### reduceRight

- reduceRight(accumulator: function): T
- reduceRight<U>(accumulator: function, seed: U, resultSelector?: undefined | function): U
- reduceRight<U, R>(accumulator: function, seed: U, resultSelector: function): R

- Inherited from Query.reduceRight

  - Defined in query.ts:1260

  Computes a scalar value by applying an accumulator callback over each element in reverse.

  category

    Scalar

  #### Parameters

  - accumulator: function —

    the callback used to compute the result.

    - - (current: T, element: T, offset: number): T

      - #### Parameters

        - current: T
        - element: T
        - offset: number

        #### Returns T

- Inherited from Query.reduceRight

  - Defined in query.ts:1268

  Computes a scalar value by applying an accumulator callback over each element in reverse.

  category

    Scalar

  #### Type parameters

  - U

  #### Parameters

  - accumulator: function —

    the callback used to compute the result.

    - - (current: U, element: T, offset: number): U

      - #### Parameters

        - current: U
        - element: T
        - offset: number

        #### Returns U

  - seed: U —

    An optional seed value.

  - Optional resultSelector: undefined | function —

    An optional callback used to compute the final result.

  #### Returns U

- Inherited from Query.reduceRight

  - Defined in query.ts:1277

  Computes a scalar value by applying an accumulator callback over each element in reverse.

  category

    Scalar

  #### Type parameters

  - U
  - R

  #### Parameters

  - accumulator: function —

    the callback used to compute the result.

    - - (current: U, element: T, offset: number): U

      - #### Parameters

        - current: U
        - element: T
        - offset: number

        #### Returns U

  - seed: U —

    An optional seed value.

  - resultSelector: function —

    An optional callback used to compute the final result.

    - - (result: U, count: number): R

      - #### Parameters

        - result: U
        - count: number

        #### Returns R

### single

- single<U>(predicate: function): U | undefined
- single(predicate?: undefined | function): T | undefined

- Inherited from Query.single

  - Defined in query.ts:1341

  Gets the only element in the Query, or returns `undefined`.

  category

    Scalar

  #### Type parameters

  - U: T

  #### Parameters

  - predicate: function —

    An optional callback used to match each element.

    - - (element: T): boolean

      - #### Parameters

        - element: T

        #### Returns boolean

  #### Returns U | undefined

- Inherited from Query.single

  - Defined in query.ts:1348

  Gets the only element in the Query, or returns undefined.

  category

    Scalar

  #### Parameters

  - Optional predicate: undefined | function —

    An optional callback used to match each element.

  #### Returns T | undefined

### some

- some(predicate?: undefined | function): boolean

- Inherited from Query.some

  - Defined in query.ts:1436

  Computes a scalar value indicating whether the Query contains any elements, optionally filtering the elements using the supplied callback.

  category

    Scalar

  #### Parameters

  - Optional predicate: undefined | function —

    An optional callback used to match each element.

  #### Returns boolean

### span

- span<U>(predicate: function): [Query<U>, Query<T>]
- span(predicate: function): [Query<T>, Query<T>]

- Inherited from Query.span

  - Defined in query.ts:1627

  Creates a tuple whose first element is a subquery containing the first span of elements that match the supplied predicate, and whose second element is a subquery containing the remaining elements.

  The first subquery is eagerly evaluated, while the second subquery is lazily evaluated.

  category

    Scalar

  #### Type parameters

  - U: T

  #### Parameters

  - predicate: function —

    The predicate used to match elements.

    - - (element: T, offset: number): boolean

      - #### Parameters

        - element: T
        - offset: number

        #### Returns boolean

  #### Returns [Query<U>, Query<T>]

- Inherited from Query.span

  - Defined in query.ts:1639

  Creates a tuple whose first element is a subquery containing the first span of elements that match the supplied predicate, and whose second element is a subquery containing the remaining elements.

  The first subquery is eagerly evaluated, while the second subquery is lazily evaluated.

  category

    Scalar

  #### Parameters

  - predicate: function —

    The predicate used to match elements.

    - - (element: T, offset: number): boolean

      - #### Parameters

        - element: T
        - offset: number

        #### Returns boolean

  #### Returns [Query<T>, Query<T>]

### startsWith

- startsWith(right: Queryable<T>, equaler?: EqualityComparison<T> | Equaler<T>): boolean
- startsWith<U>(right: Queryable<U>, equaler: function): boolean

- Inherited from Query.startsWith

  - Defined in query.ts:1556

  Computes a scalar value indicating whether the elements of this Query start with the same sequence of elements in another Queryable.

  category

    Scalar

  #### Parameters

  - right: Queryable<T> —

    A Queryable object.

  - Optional equaler: EqualityComparison<T> | Equaler<T> —

    A callback used to compare the equality of two elements.

  #### Returns boolean

- Inherited from Query.startsWith

  - Defined in query.ts:1565

  Computes a scalar value indicating whether the elements of this Query start with the same sequence of elements in another Queryable.

  category

    Scalar

  #### Type parameters

  - U

  #### Parameters

  - right: Queryable<U> —

    A Queryable object.

  - equaler: function —

    A callback used to compare the equality of two elements.

    - - (left: T, right: U): boolean

      - #### Parameters

        - left: T
        - right: U

        #### Returns boolean

### sum

- sum(): T extends number ? number : never
- sum(elementSelector: function): number

- Inherited from Query.sum

  - Defined in query.ts:1402

  Computes the sum for a series of numbers.

  category

    Scalar

  #### Returns T extends number ? number : never

- Inherited from Query.sum

  - Defined in query.ts:1408

  Computes the sum for a series of numbers.

  category

    Scalar

  #### Parameters

  - elementSelector: function
    - - (element: T): number

      - #### Parameters

        - element: T

        #### Returns number

### toArray

- toArray(): T[]
- toArray<V>(elementSelector: function): V[]

- Inherited from Query.toArray

  - Defined in query.ts:1708

  Creates an Array for the elements of the Query.

  category

    Scalar

  #### Returns T[]

- Inherited from Query.toArray

  - Defined in query.ts:1715

  Creates an Array for the elements of the Query.

  category

    Scalar

  #### Type parameters

  - V

  #### Parameters

  - elementSelector: function —

    A callback that selects a value for each element.

    - - (element: T): V

      - #### Parameters

        - element: T

        #### Returns V

  #### Returns V[]

### toLookup

- toLookup<K>(keySelector: function, keyEqualer?: Equaler<K>): Lookup<K, T>
- toLookup<K, V>(keySelector: function, elementSelector: function, keyEqualer?: Equaler<K>): Lookup<K, V>

- Inherited from Query.toLookup

  - Defined in query.ts:1793

  Creates a `Lookup` for the elements of the Query.

  category

    Scalar

  #### Type parameters

  - K

  #### Parameters

  - keySelector: function —

    A callback used to select a key for each element.

    - - (element: T): K

      - #### Parameters

        - element: T

        #### Returns K

  - Optional keyEqualer: Equaler<K> —

    An [[Equaler]] object used to compare key equality.

  #### Returns Lookup<K, T>

- Inherited from Query.toLookup

  - Defined in query.ts:1802

  Creates a `Lookup` for the elements of the Query.

  category

    Scalar

  #### Type parameters

  - K
  - V

  #### Parameters

  - keySelector: function —

    A callback used to select a key for each element.

    - - (element: T): K

      - #### Parameters

        - element: T

        #### Returns K

  - elementSelector: function —

    A callback that selects a value for each element.

    - - (element: T): V

      - #### Parameters

        - element: T

        #### Returns V

  - Optional keyEqualer: Equaler<K> —

    An [[Equaler]] object used to compare key equality.

  #### Returns Lookup<K, V>

### toMap

- toMap<K>(keySelector: function): Map<K, T>
- toMap<K>(keySelector: function, keyEqualer: Equaler<K>): HashMap<K, T>
- toMap<K, V>(keySelector: function, elementSelector: function): Map<K, V>
- toMap<K, V>(keySelector: function, elementSelector: function, keyEqualer: Equaler<K>): HashMap<K, V>

- Inherited from Query.toMap

  - Defined in query.ts:1756

  Creates a `Map` for the elements of the Query.

  category

    Scalar

  #### Type parameters

  - K

  #### Parameters

  - keySelector: function —

    A callback used to select a key for each element.

    - - (element: T): K

      - #### Parameters

        - element: T

        #### Returns K

  #### Returns Map<K, T>

- Inherited from Query.toMap

  - Defined in query.ts:1764

  Creates a `Map` for the elements of the Query.

  category

    Scalar

  #### Type parameters

  - K

  #### Parameters

  - keySelector: function —

    A callback used to select a key for each element.

    - - (element: T): K

      - #### Parameters

        - element: T

        #### Returns K

  - keyEqualer: Equaler<K> —

    An [[Equaler]] object used to compare key equality.

  #### Returns HashMap<K, T>

- Inherited from Query.toMap

  - Defined in query.ts:1772

  Creates a `Map` for the elements of the Query.

  category

    Scalar

  #### Type parameters

  - K
  - V

  #### Parameters

  - keySelector: function —

    A callback used to select a key for each element.

    - - (element: T): K

      - #### Parameters

        - element: T

        #### Returns K

  - elementSelector: function —

    A callback that selects a value for each element.

    - - (element: T): V

      - #### Parameters

        - element: T

        #### Returns V

  #### Returns Map<K, V>

- Inherited from Query.toMap

  - Defined in query.ts:1781

  Creates a `Map` for the elements of the Query.

  category

    Scalar

  #### Type parameters

  - K
  - V

  #### Parameters

  - keySelector: function —

    A callback used to select a key for each element.

    - - (element: T): K

      - #### Parameters

        - element: T

        #### Returns K

  - elementSelector: function —

    A callback that selects a value for each element.

    - - (element: T): V

      - #### Parameters

        - element: T

        #### Returns V

  - keyEqualer: Equaler<K> —

    An [[Equaler]] object used to compare key equality.

  #### Returns HashMap<K, V>

### toObject

- toObject(prototype: object | null | undefined, keySelector: function): object
- toObject<V>(prototype: object | null | undefined, keySelector: function, elementSelector: function, descriptorSelector?: undefined | function): object

- Inherited from Query.toObject

  - Defined in query.ts:1837

  Creates an Object for the elements of the Query. Properties are added via `Object.defineProperty`.

      // As a regular object
      const obj = from([["x", 1], ["y", 2]]).toObject(undefined, a => a[0]);
      obj.x; // ["x", 1]
      obj.y; // ["y", 2]
      typeof obj.toString; // function

      // with a custom prototype
      const baseObject = { toString() { return `${this.x}:${this.y}` } };
      const obj = from([["x", 1], ["y", 2]]).toObject(baseObject, a => a[0]);
      obj.x; // ["x", 1]
      obj.y; // ["y", 2]
      typeof obj.toString; // function
      obj.toString(); // "x",1:"y",2

      // with a null prototype
      const obj = from([["x", 1], ["y", 2]]).toObject(null, a => a[0]);
      obj.x; // ["x", 1]
      obj.y; // ["y", 2]
      typeof obj.toString; // undefined

  category

    Scalar

  #### Parameters

  - prototype: object | null | undefined —

    The prototype for the object. If `prototype` is `null`, an object with a `null` prototype is created. If `prototype` is `undefined`, the default `Object.prototype` is used.

  - keySelector: function —

    A callback used to select a key for each element.

    - - (element: T): PropertyKey

      - #### Parameters

        - element: T

        #### Returns PropertyKey

  #### Returns object

- Inherited from Query.toObject

  - Defined in query.ts:1870

  Creates an Object for the elements the Query. Properties are added via `Object.defineProperty`.

      // As a regular object
      const obj = from([["x", 1], ["y", 2]]).toObject(undefined, a => a[0], a => a[1]);
      obj.x; // 1
      obj.y; // 2
      typeof obj.toString; // function

      // with a custom prototype
      const baseObject = { toString() { return `${this.x}:${this.y}` } };
      const obj = from([["x", 1], ["y", 2]]).toObject(baseObject, a => a[0], a => a[1]);
      obj.x; // 1
      obj.y; // 2
      typeof obj.toString; // function
      obj.toString(); // 1:2

      // with a null prototype
      const obj = from([["x", 1], ["y", 2]]).toObject(null, a => a[0], a => a[1]);
      obj.x; // 1
      obj.y; // 2
      typeof obj.toString; // undefined

  category

    Scalar

  #### Type parameters

  - V

  #### Parameters

  - prototype: object | null | undefined —

    The prototype for the object. If `prototype` is `null`, an object with a `null` prototype is created. If `prototype` is `undefined`, the default `Object.prototype` is used.

  - keySelector: function —

    A callback used to select a key for each element.

    - - (element: T): PropertyKey

      - #### Parameters

        - element: T

        #### Returns PropertyKey

  - elementSelector: function —

    A callback that selects a value for each element.

    - - (element: T): V

      - #### Parameters

        - element: T

        #### Returns V

  - Optional descriptorSelector: undefined | function —

    A callback that defines the `PropertyDescriptor` for each property.

  #### Returns object

### toSet

- toSet(): Set<T>
- toSet(equaler: Equaler<T>): HashSet<T>
- toSet<V>(elementSelector: function): Set<V>
- toSet<V>(elementSelector: function, equaler: Equaler<V>): HashSet<V>

- Inherited from Query.toSet

  - Defined in query.ts:1724

  Creates a `Set` for the elements of the Query.

  category

    Scalar

  #### Returns Set<T>

- Inherited from Query.toSet

  - Defined in query.ts:1730

  Creates a `Set` for the elements of the Query.

  category

    Scalar

  #### Parameters

  - equaler: Equaler<T> —

    An [[Equaler]] object used to compare equality.

  #### Returns HashSet<T>

- Inherited from Query.toSet

  - Defined in query.ts:1737

  Creates a `Set` for the elements of the Query.

  category

    Scalar

  #### Type parameters

  - V

  #### Parameters

  - elementSelector: function —

    A callback that selects a value for each element.

    - - (element: T): V

      - #### Parameters

        - element: T

        #### Returns V

  #### Returns Set<V>

- Inherited from Query.toSet

  - Defined in query.ts:1745

  Creates a `Set` for the elements of the Query.

  category

    Scalar

  #### Type parameters

  - V

  #### Parameters

  - elementSelector: function —

    A callback that selects a value for each element.

    - - (element: T): V

      - #### Parameters

        - element: T

        #### Returns V

  - equaler: Equaler<V> —

    An [[Equaler]] object used to compare equality.

  #### Returns HashSet<V>

### unzip

- unzip(): T extends [any, ...any[]] ? { [I in keyof T]: T[I][]; } : unknown[]
- unzip<U>(partSelector: function): object

- Inherited from Query.unzip

  - Defined in query.ts:1692

  Unzips a sequence of tuples into a tuple of sequences.

  category

    Scalar

  #### Returns T extends [any, ...any[]] ? { [I in keyof T]: T[I][]; } : unknown[]

- Inherited from Query.unzip

  - Defined in query.ts:1699

  Unzips a sequence of tuples into a tuple of sequences.

  category

    Scalar

  #### Type parameters

  - U: [any, Array]

  #### Parameters

  - partSelector: function —

    A callback that converts a result into a tuple.

    - - (value: T): U

      - #### Parameters

        - value: T

        #### Returns U

  #### Returns object

## Methods (Subquery)

### append

- append(value: T): UnorderedQueryFlow<this, T>

- Inherited from Query.append

  - Defined in query.ts:906

  Creates a subquery for the elements of this Query with the provided value appended to the end.

  category

    Subquery

  #### Parameters

  - value: T —

    The value to append.

  #### Returns UnorderedQueryFlow<this, T>

### concat

- concat(right: Queryable<T>): UnorderedQueryFlow<this, T>

- Inherited from Query.concat

  - Defined in query.ts:875

  Creates a subquery that concatenates this Query with another Queryable.

  category

    Subquery

  #### Parameters

  - right: Queryable<T> —

    A Queryable object.

  #### Returns UnorderedQueryFlow<this, T>

### defaultIfEmpty

- defaultIfEmpty(defaultValue: T): UnorderedQueryFlow<this, T>

- Inherited from Query.defaultIfEmpty

  - Defined in query.ts:940

  Creates a subquery that contains the provided default value if this Query contains no elements.

  category

    Subquery

  #### Parameters

  - defaultValue: T —

    The default value.

  #### Returns UnorderedQueryFlow<this, T>

### distinct

- distinct(equaler?: Equaler<T>): UnorderedQueryFlow<this, T>

- Inherited from Query.distinct

  - Defined in query.ts:884

  Creates a subquery for the distinct elements of this Query.

  category

    Subquery

  #### Parameters

  - Optional equaler: Equaler<T> —

    An [[Equaler]] object used to compare key equality.

  #### Returns UnorderedQueryFlow<this, T>

### distinctBy

- distinctBy<K>(keySelector: function, keyEqualer?: Equaler<K>): UnorderedQueryFlow<this, T>

- Inherited from Query.distinctBy

  - Defined in query.ts:896

  Creates a subquery for the distinct elements of this Query.

  category

    Subquery

  #### Type parameters

  - K

  #### Parameters

  - keySelector: function —

    A callback used to select the key to determine uniqueness.

    - - (value: T): K

      - #### Parameters

        - value: T —

          An element from which to select a key.

        #### Returns K

  - Optional keyEqualer: Equaler<K> —

    An [[Equaler]] object used to compare key equality.

  #### Returns UnorderedQueryFlow<this, T>

### do

- do(callback: function): UnorderedQueryFlow<this, T>

- Inherited from Query.do

  - Defined in query.ts:548

  Lazily invokes a callback as each element of the Query is iterated.

  category

    Subquery

  #### Parameters

  - callback: function —

    The callback to invoke.

    - - (element: T, offset: number): void

      - #### Parameters

        - element: T —

          An element of the source.

        - offset: number —

          The offset from the start of the source iterable.

        #### Returns void

  #### Returns UnorderedQueryFlow<this, T>

### except

- except(right: Queryable<T>, equaler?: Equaler<T>): UnorderedQueryFlow<this, T>

- Inherited from Query.except

  - Defined in query.ts:776

  Creates a subquery for the set difference between this and another Queryable.

  category

    Subquery

  #### Parameters

  - right: Queryable<T> —

    A Queryable object.

  - Optional equaler: Equaler<T> —

    An [[Equaler]] object used to compare equality.

  #### Returns UnorderedQueryFlow<this, T>

### exceptBy

- exceptBy<K>(right: Queryable<T>, keySelector: function, keyEqualer?: Equaler<K>): UnorderedQueryFlow<this, T>

- Inherited from Query.exceptBy

  - Defined in query.ts:789

  Creates a subquery for the set difference between this and another Queryable, where set identity is determined by the selected key.

  category

    Subquery

  #### Type parameters

  - K

  #### Parameters

  - right: Queryable<T> —

    A Queryable object.

  - keySelector: function —

    A callback used to select the key for each element.

    - - (element: T): K

      - #### Parameters

        - element: T —

          An element from which to select a key.

        #### Returns K

  - Optional keyEqualer: Equaler<K> —

    An [[Equaler]] object used to compare key equality.

  #### Returns UnorderedQueryFlow<this, T>

### exclude

- exclude(...values: [T, Array]): UnorderedQueryFlow<this, T>

- Inherited from Query.exclude

  - Defined in query.ts:581

  Creates a subquery with every instance of the specified value removed.

  category

    Subquery

  #### Parameters

  - Rest ...values: [T, Array] —

    The values to exclude.

  #### Returns UnorderedQueryFlow<this, T>

### expand

- expand(projection: function): Query<T>

- Inherited from Query.expand

  - Defined in query.ts:536

  Creates a subquery that iterates the results of recursively expanding the elements of the source.

  category

    Subquery

  #### Parameters

  - projection: function —

    A callback used to recusively expand each element.

    - - (element: T): Queryable<T>

      - #### Parameters

        - element: T —

          The element to expand.

        #### Returns Queryable<T>

  #### Returns Query<T>

### filter

- filter<U>(predicate: function): UnorderedQueryFlow<this, U>
- filter(predicate: function): UnorderedQueryFlow<this, T>

- Inherited from Query.filter

  - Defined in query.ts:342

  Creates a subquery whose elements match the supplied predicate.

  category

    Subquery

  #### Type parameters

  - U: T

  #### Parameters

  - predicate: function —

    A callback used to match each element.

    - - (element: T, offset: number): boolean

      - #### Parameters

        - element: T —

          The element to test.

        - offset: number —

          The offset from the start of the source iterable.

        #### Returns boolean

  #### Returns UnorderedQueryFlow<this, U>

- Inherited from Query.filter

  - Defined in query.ts:351

  Creates a subquery whose elements match the supplied predicate.

  category

    Subquery

  #### Parameters

  - predicate: function —

    A callback used to match each element.

    - - (element: T, offset: number): boolean

      - #### Parameters

        - element: T —

          The element to test.

        - offset: number —

          The offset from the start of the source iterable.

        #### Returns boolean

  #### Returns UnorderedQueryFlow<this, T>

### filterBy

- filterBy<K>(keySelector: function, predicate: function): UnorderedQueryFlow<this, T>

- Inherited from Query.filterBy

  - Defined in query.ts:366

  Creates a subquery where the selected key for each element matches the supplied predicate.

  category

    Subquery

  #### Type parameters

  - K

  #### Parameters

  - keySelector: function —

    A callback used to select the key for each element.

    - - (element: T): K

      - #### Parameters

        - element: T —

          The element from which to select a key.

        #### Returns K

  - predicate: function —

    A callback used to match each key.

    - - (key: K, offset: number): boolean

      - #### Parameters

        - key: K —

          The key to test.

        - offset: number —

          The offset from the start of the source iterable.

        #### Returns boolean

  #### Returns UnorderedQueryFlow<this, T>

### filterDefined

- filterDefined(): UnorderedQueryFlow<this, NonNullable<T>>
- filterDefined<K>(keySelector: function): UnorderedQueryFlow<this, T>

- Inherited from Query.filterDefined

  - Defined in query.ts:375

  Creates a subquery whose elements are neither `null` nor `undefined`.

  category

    Subquery

  #### Returns UnorderedQueryFlow<this, NonNullable<T>>

- Inherited from Query.filterDefined

  - Defined in query.ts:383

  Creates a subquery where the selected key for each element is neither `null` nor `undefined`.

  category

    Subquery

  #### Type parameters

  - K

  #### Parameters

  - keySelector: function —

    A callback used to select the key for each element.

    - - (element: T): K

      - #### Parameters

        - element: T —

          The element from which to select a key.

        #### Returns K

  #### Returns UnorderedQueryFlow<this, T>

### flatMap

- flatMap<U>(projection: function): Query<U>
- flatMap<U, R>(projection: function, resultSelector: function): Query<R>

- Inherited from Query.flatMap

  - Defined in query.ts:485

  Creates a subquery that iterates the results of applying a callback to each element.

  category

    Subquery

  #### Type parameters

  - U

  #### Parameters

  - projection: function —

    A callback used to map each element into a Queryable.

    - - (element: T): Queryable<U>

      - #### Parameters

        - element: T —

          The element to map.

        #### Returns Queryable<U>

  #### Returns Query<U>

- Inherited from Query.flatMap

  - Defined in query.ts:496

  Creates a subquery that iterates the results of applying a callback to each element.

  category

    Subquery

  #### Type parameters

  - U
  - R

  #### Parameters

  - projection: function —

    A callback used to map each element into a Queryable.

    - - (element: T): Queryable<U>

      - #### Parameters

        - element: T —

          The outer element to map.

        #### Returns Queryable<U>

  - resultSelector: function —

    An optional callback used to map the outer and projected inner elements.

    - - (element: T, innerElement: U): R

      - #### Parameters

        - element: T —

          The outer element to map.

        - innerElement: U —

          An inner element produced by the `projection` of the outer element.

        #### Returns R

  #### Returns Query<R>

### groupBy

- groupBy<K>(keySelector: function, keyEqualer?: Equaler<K>): Query<Grouping<K, T>>
- groupBy<K, V>(keySelector: function, elementSelector: function, keyEqualer?: Equaler<K>): Query<Grouping<K, V>>
- groupBy<K, V, R>(keySelector: function, elementSelector: function, resultSelector: function, keyEqualer?: Equaler<K>): Query<R>

- Inherited from Query.groupBy

  - Defined in query.ts:999

  Groups each element of this Query by its key.

  category

    Subquery

  #### Type parameters

  - K

  #### Parameters

  - keySelector: function —

    A callback used to select the key for an element.

    - - (element: T): K

      - #### Parameters

        - element: T —

          An element from which to select a key.

        #### Returns K

  - Optional keyEqualer: Equaler<K> —

    An [[Equaler]] object used to compare key equality.

  #### Returns Query<Grouping<K, T>>

- Inherited from Query.groupBy

  - Defined in query.ts:1010

  Groups each element by its key.

  category

    Subquery

  #### Type parameters

  - K
  - V

  #### Parameters

  - keySelector: function —

    A callback used to select the key for an element.

    - - (element: T): K

      - #### Parameters

        - element: T —

          An element from which to select a key.

        #### Returns K

  - elementSelector: function —

    A callback used to select a value for an element.

    - - (element: T): V

      - #### Parameters

        - element: T —

          An element from which to select a value.

        #### Returns V

  - Optional keyEqualer: Equaler<K> —

    An [[Equaler]] object used to compare key equality.

  #### Returns Query<Grouping<K, V>>

- Inherited from Query.groupBy

  - Defined in query.ts:1024

  Groups each element by its key.

  category

    Subquery

  #### Type parameters

  - K
  - V
  - R

  #### Parameters

  - keySelector: function —

    A callback used to select the key for an element.

    - - (element: T): K

      - #### Parameters

        - element: T —

          An element from which to select a key.

        #### Returns K

  - elementSelector: function —

    A callback used to select a value for an element.

    - - (element: T): V

      - #### Parameters

        - element: T —

          An element from which to select a value.

        #### Returns V

  - resultSelector: function —

    A callback used to select a result from a group.

    - - (key: K, elements: Query<V>): R

      - #### Parameters

        - key: K —

          The key for the group.

        - elements: Query<V> —

          The elements for the group.

        #### Returns R

  - Optional keyEqualer: Equaler<K> —

    An [[Equaler]] object used to compare key equality.

  #### Returns Query<R>

### intersect

- intersect<UNode, U>(right: HierarchyIterable<UNode, U>, equaler?: Equaler<T>): HierarchyQuery<UNode, U>
- intersect<U>(right: Queryable<U>, equaler?: Equaler<T>): Query<U>
- intersect(right: Queryable<T>, equaler?: Equaler<T>): Query<T>

- Inherited from Query.intersect

  - Defined in query.ts:690

  Creates a subquery for the set intersection of this Query and another Queryable.

  category

    Subquery

  #### Type parameters

  - UNode
  - U: UNode & T

  #### Parameters

  - right: HierarchyIterable<UNode, U> —

    A Queryable object.

  - Optional equaler: Equaler<T> —

    An [[Equaler]] object used to compare equality.

  #### Returns HierarchyQuery<UNode, U>

- Inherited from Query.intersect

  - Defined in query.ts:698

  Creates a subquery for the set intersection of this Query and another Queryable.

  category

    Subquery

  #### Type parameters

  - U: T

  #### Parameters

  - right: Queryable<U> —

    A Queryable object.

  - Optional equaler: Equaler<T> —

    An [[Equaler]] object used to compare equality.

  #### Returns Query<U>

- Inherited from Query.intersect

  - Defined in query.ts:706

  Creates a subquery for the set intersection of this Query and another Queryable.

  category

    Subquery

  #### Parameters

  - right: Queryable<T> —

    A Queryable object.

  - Optional equaler: Equaler<T> —

    An [[Equaler]] object used to compare equality.

  #### Returns Query<T>

### intersectBy

- intersectBy<UNode, U, K>(right: HierarchyIterable<UNode, U>, keySelector: function, keyEqualer?: Equaler<K>): HierarchyQuery<UNode, U>
- intersectBy<U, K>(right: Queryable<U>, keySelector: function, keyEqualer?: Equaler<K>): Query<U>
- intersectBy<K>(right: Queryable<T>, keySelector: function, keyEqualer?: Equaler<K>): Query<T>

- Inherited from Query.intersectBy

  - Defined in query.ts:720

  Creates a subquery for the set intersection of this Query and another Queryable, where set identity is determined by the selected key.

  category

    Subquery

  #### Type parameters

  - UNode
  - U: UNode & T
  - K

  #### Parameters

  - right: HierarchyIterable<UNode, U> —

    A Queryable object.

  - keySelector: function —

    A callback used to select the key for each element.

    - - (element: T): K

      - #### Parameters

        - element: T —

          An element from which to select a key.

        #### Returns K

  - Optional keyEqualer: Equaler<K> —

    An [[Equaler]] object used to compare key equality.

  #### Returns HierarchyQuery<UNode, U>

- Inherited from Query.intersectBy

  - Defined in query.ts:730

  Creates a subquery for the set intersection of this Query and another Queryable, where set identity is determined by the selected key.

  category

    Subquery

  #### Type parameters

  - U: T
  - K

  #### Parameters

  - right: Queryable<U> —

    A Queryable object.

  - keySelector: function —

    A callback used to select the key for each element.

    - - (element: T): K

      - #### Parameters

        - element: T —

          An element from which to select a key.

        #### Returns K

  - Optional keyEqualer: Equaler<K> —

    An [[Equaler]] object used to compare key equality.

  #### Returns Query<U>

- Inherited from Query.intersectBy

  - Defined in query.ts:740

  Creates a subquery for the set intersection of this Query and another Queryable, where set identity is determined by the selected key.

  category

    Subquery

  #### Type parameters

  - K

  #### Parameters

  - right: Queryable<T> —

    A Queryable object.

  - keySelector: function —

    A callback used to select the key for each element.

    - - (element: T): K

      - #### Parameters

        - element: T —

          An element from which to select a key.

        #### Returns K

  - Optional keyEqualer: Equaler<K> —

    An [[Equaler]] object used to compare key equality.

  #### Returns Query<T>

### map

- map<U>(selector: function): Query<U>

- Inherited from Query.map

  - Defined in query.ts:460

  Creates a subquery by applying a callback to each element.

  category

    Subquery

  #### Type parameters

  - U

  #### Parameters

  - selector: function —

    A callback used to map each element.

    - - (element: T, offset: number): U

      - #### Parameters

        - element: T —

          The element to map.

        - offset: number —

          The offset from the start of the source iterable.

        #### Returns U

  #### Returns Query<U>

### pageBy

- pageBy(pageSize: number): Query<Page<T>>

- Inherited from Query.pageBy

  - Defined in query.ts:952

  Creates a subquery that splits this Query into one or more pages. While advancing from page to page is evaluated lazily, the elements of the page are evaluated eagerly.

  category

    Subquery

  #### Parameters

  - pageSize: number —

    The number of elements per page.

  #### Returns Query<Page<T>>

### patch

- patch(start: number, skipCount?: undefined | number, range?: Queryable<T>): UnorderedQueryFlow<this, T>

- Inherited from Query.patch

  - Defined in query.ts:929

  Creates a subquery for the elements of this Query with the provided range patched into the results.

  category

    Subquery

  #### Parameters

  - start: number —

    The offset at which to patch the range.

  - Optional skipCount: undefined | number —

    The number of elements to skip from start.

  - Optional range: Queryable<T> —

    The range to patch into the result.

  #### Returns UnorderedQueryFlow<this, T>

### prepend

- prepend(value: T): UnorderedQueryFlow<this, T>

- Inherited from Query.prepend

  - Defined in query.ts:916

  Creates a subquery for the elements of this Query with the provided value prepended to the beginning.

  category

    Subquery

  #### Parameters

  - value: T —

    The value to prepend.

  #### Returns UnorderedQueryFlow<this, T>

### relativeComplement

- relativeComplement(right: Queryable<T>, equaler?: Equaler<T>): UnorderedQueryFlow<this, T>

- Inherited from Query.relativeComplement

  - Defined in query.ts:800

  Creates a subquery for the set difference between this and another Queryable.

  category

    Subquery

  #### Parameters

  - right: Queryable<T> —

    A Queryable object.

  - Optional equaler: Equaler<T> —

    An [[Equaler]] object used to compare equality.

  #### Returns UnorderedQueryFlow<this, T>

### relativeComplementBy

- relativeComplementBy<K>(right: Queryable<T>, keySelector: function, keyEqualer?: Equaler<K>): UnorderedQueryFlow<this, T>

- Inherited from Query.relativeComplementBy

  - Defined in query.ts:813

  Creates a subquery for the set difference between this and another Queryable, where set identity is determined by the selected key.

  category

    Subquery

  #### Type parameters

  - K

  #### Parameters

  - right: Queryable<T> —

    A Queryable object.

  - keySelector: function —

    A callback used to select the key for each element.

    - - (element: T): K

      - #### Parameters

        - element: T —

          An element from which to select a key.

        #### Returns K

  - Optional keyEqualer: Equaler<K> —

    An [[Equaler]] object used to compare key equality.

  #### Returns UnorderedQueryFlow<this, T>

### reverse

- reverse(): UnorderedQueryFlow<this, T>

- Inherited from Query.reverse

  - Defined in query.ts:571

  Creates a subquery whose elements are in the reverse order.

  category

    Subquery

  #### Returns UnorderedQueryFlow<this, T>

### scan

- scan(accumulator: function): Query<T>
- scan<U>(accumulator: function, seed: U): Query<U>

- Inherited from Query.scan

  - Defined in query.ts:1046

  Creates a subquery containing the cumulative results of applying the provided callback to each element.

  category

    Subquery

  #### Parameters

  - accumulator: function —

    The callback used to compute each result.

    - - (current: T, element: T, offset: number): T

      - #### Parameters

        - current: T —

          The current accumulated value.

        - element: T —

          The value to accumulate.

        - offset: number —

          The offset from the start of the underlying Queryable.

        #### Returns T

  #### Returns Query<T>

- Inherited from Query.scan

  - Defined in query.ts:1057

  Creates a subquery containing the cumulative results of applying the provided callback to each element.

  category

    Subquery

  #### Type parameters

  - U

  #### Parameters

  - accumulator: function —

    The callback used to compute each result.

    - - (current: U, element: T, offset: number): U

      - #### Parameters

        - current: U —

          The current accumulated value.

        - element: T —

          The value to accumulate.

        - offset: number —

          The offset from the start of the underlying Queryable.

        #### Returns U

  - seed: U —

    An optional seed value.

  #### Returns Query<U>

### scanRight

- scanRight(accumulator: function): Query<T>
- scanRight<U>(accumulator: function, seed?: U): Query<U>

- Inherited from Query.scanRight

  - Defined in query.ts:1073

  Creates a subquery containing the cumulative results of applying the provided callback to each element in reverse.

  category

    Subquery

  #### Parameters

  - accumulator: function —

    The callback used to compute each result.

    - - (current: T, element: T, offset: number): T

      - #### Parameters

        - current: T —

          The current accumulated value.

        - element: T —

          The value to accumulate.

        - offset: number —

          The offset from the start of the underlying Queryable.

        #### Returns T

  #### Returns Query<T>

- Inherited from Query.scanRight

  - Defined in query.ts:1084

  Creates a subquery containing the cumulative results of applying the provided callback to each element in reverse.

  category

    Subquery

  #### Type parameters

  - U

  #### Parameters

  - accumulator: function —

    The callback used to compute each result.

    - - (current: U, element: T, offset: number): U

      - #### Parameters

        - current: U —

          The current accumulated value.

        - element: T —

          The value to accumulate.

        - offset: number —

          The offset from the start of the underlying Queryable.

        #### Returns U

  - Optional seed: U —

    An optional seed value.

  #### Returns Query<U>

### select

- select<U>(selector: function): Query<U>

- Inherited from Query.select

  - Defined in query.ts:474

  Creates a subquery by applying a callback to each element.

  NOTE: This is an alias for map.

  category

    Subquery

  #### Type parameters

  - U

  #### Parameters

  - selector: function —

    A callback used to map each element.

    - - (element: T, offset: number): U

      - #### Parameters

        - element: T —

          The element to map.

        - offset: number —

          The offset from the start of the source Queryable.

        #### Returns U

  #### Returns Query<U>

### selectMany

- selectMany<U>(projection: function): Query<U>
- selectMany<U, R>(projection: function, resultSelector: function): Query<R>

- Inherited from Query.selectMany

  - Defined in query.ts:510

  Creates a subquery that iterates the results of applying a callback to each element.

  NOTE: This is an alias for flatMap.

  category

    Subquery

  #### Type parameters

  - U

  #### Parameters

  - projection: function —

    A callback used to map each element into an iterable.

    - - (element: T): Queryable<U>

      - #### Parameters

        - element: T —

          The element to map.

        #### Returns Queryable<U>

  #### Returns Query<U>

- Inherited from Query.selectMany

  - Defined in query.ts:523

  Creates a subquery that iterates the results of applying a callback to each element.

  NOTE: This is an alias for flatMap.

  category

    Subquery

  #### Type parameters

  - U
  - R

  #### Parameters

  - projection: function —

    A callback used to map each element into an iterable.

    - - (element: T): Queryable<U>

      - #### Parameters

        - element: T —

          The element to map.

        #### Returns Queryable<U>

  - resultSelector: function —

    An optional callback used to map the outer and projected inner elements.

    - - (element: T, innerElement: U): R

      - #### Parameters

        - element: T —

          The outer element to map.

        - innerElement: U —

          An inner element produced by the `projection` of the outer element.

        #### Returns R

  #### Returns Query<R>

### skip

- skip(count: number): UnorderedQueryFlow<this, T>

- Inherited from Query.skip

  - Defined in query.ts:592

  Creates a subquery containing all elements except the first elements up to the supplied count.

  category

    Subquery

  #### Parameters

  - count: number —

    The number of elements to skip.

  #### Returns UnorderedQueryFlow<this, T>

### skipRight

- skipRight(count: number): UnorderedQueryFlow<this, T>

- Inherited from Query.skipRight

  - Defined in query.ts:603

  Creates a subquery containing all elements except the last elements up to the supplied count.

  category

    Subquery

  #### Parameters

  - count: number —

    The number of elements to skip.

  #### Returns UnorderedQueryFlow<this, T>

### skipUntil

- skipUntil(predicate: function): UnorderedQueryFlow<this, T>

- Inherited from Query.skipUntil

  - Defined in query.ts:627

  Creates a subquery containing all elements except the first elements that don't match the supplied predicate.

  category

    Subquery

  #### Parameters

  - predicate: function —

    A callback used to match each element.

    - - (element: T): boolean

      - #### Parameters

        - element: T —

          The element to match.

        #### Returns boolean

  #### Returns UnorderedQueryFlow<this, T>

### skipWhile

- skipWhile(predicate: function): UnorderedQueryFlow<this, T>

- Inherited from Query.skipWhile

  - Defined in query.ts:615

  Creates a subquery containing all elements except the first elements that match the supplied predicate.

  category

    Subquery

  #### Parameters

  - predicate: function —

    A callback used to match each element.

    - - (element: T): boolean

      - #### Parameters

        - element: T —

          The element to match.

        #### Returns boolean

  #### Returns UnorderedQueryFlow<this, T>

### spanMap

- spanMap<K>(keySelector: function): Query<Grouping<K, T>>
- spanMap<K, V>(keySelector: function, elementSelector: function): Query<Grouping<K, V>>
- spanMap<K, V, R>(keySelector: function, elementSelector: function, spanSelector: function): Query<R>

- Inherited from Query.spanMap

  - Defined in query.ts:963

  Creates a subquery whose elements are the contiguous ranges of elements that share the same key.

  category

    Subquery

  #### Type parameters

  - K

  #### Parameters

  - keySelector: function —

    A callback used to select the key for an element.

    - - (element: T): K

      - #### Parameters

        - element: T —

          An element from which to select a key.

        #### Returns K

  #### Returns Query<Grouping<K, T>>

- Inherited from Query.spanMap

  - Defined in query.ts:973

  Creates a subquery whose values are computed from each element of the contiguous ranges of elements that share the same key.

  category

    Subquery

  #### Type parameters

  - K
  - V

  #### Parameters

  - keySelector: function —

    A callback used to select the key for an element.

    - - (element: T): K

      - #### Parameters

        - element: T —

          An element from which to select a key.

        #### Returns K

  - elementSelector: function —

    A callback used to select a value for an element.

    - - (element: T): V

      - #### Parameters

        - element: T —

          An element from which to select a value.

        #### Returns V

  #### Returns Query<Grouping<K, V>>

- Inherited from Query.spanMap

  - Defined in query.ts:986

  Creates a subquery whose values are computed from the contiguous ranges of elements that share the same key.

  category

    Subquery

  #### Type parameters

  - K
  - V
  - R

  #### Parameters

  - keySelector: function —

    A callback used to select the key for an element.

    - - (element: T): K

      - #### Parameters

        - element: T —

          An element from which to select a key.

        #### Returns K

  - elementSelector: function —

    A callback used to select a value for an element.

    - - (element: T): V

      - #### Parameters

        - element: T —

          An element from which to select a value.

        #### Returns V

  - spanSelector: function —

    A callback used to select a result from a contiguous range.

    - - (key: K, elements: Query<V>): R

      - #### Parameters

        - key: K —

          The key for the span.

        - elements: Query<V> —

          The elements for the span.

        #### Returns R

  #### Returns Query<R>

### symmetricDifference

- symmetricDifference(right: Queryable<T>, equaler?: Equaler<T>): UnorderedQueryFlow<this, T>

- Inherited from Query.symmetricDifference

  - Defined in query.ts:824

  Creates a subquery for the symmetric difference between this and another Queryable.

  category

    Subquery

  #### Parameters

  - right: Queryable<T> —

    A Queryable object.

  - Optional equaler: Equaler<T> —

    An [[Equaler]] object used to compare equality.

  #### Returns UnorderedQueryFlow<this, T>

### symmetricDifferenceBy

- symmetricDifferenceBy<K>(right: Queryable<T>, keySelector: function, keyEqualer?: Equaler<K>): UnorderedQueryFlow<this, T>

- Inherited from Query.symmetricDifferenceBy

  - Defined in query.ts:837

  Creates a subquery for the symmetric difference between this and another Queryable, where set identity is determined by the selected key.

  category

    Subquery

  #### Type parameters

  - K

  #### Parameters

  - right: Queryable<T> —

    A Queryable object.

  - keySelector: function —

    A callback used to select the key for each element.

    - - (element: T): K

      - #### Parameters

        - element: T —

          An element from which to select a key.

        #### Returns K

  - Optional keyEqualer: Equaler<K> —

    An [[Equaler]] object used to compare key equality.

  #### Returns UnorderedQueryFlow<this, T>

### take

- take(count: number): UnorderedQueryFlow<this, T>

- Inherited from Query.take

  - Defined in query.ts:638

  Creates a subquery containing the first elements up to the supplied count.

  category

    Subquery

  #### Parameters

  - count: number —

    The number of elements to take.

  #### Returns UnorderedQueryFlow<this, T>

### takeRight

- takeRight(count: number): UnorderedQueryFlow<this, T>

- Inherited from Query.takeRight

  - Defined in query.ts:649

  Creates a subquery containing the last elements up to the supplied count.

  category

    Subquery

  #### Parameters

  - count: number —

    The number of elements to take.

  #### Returns UnorderedQueryFlow<this, T>

### takeUntil

- takeUntil(predicate: function): UnorderedQueryFlow<this, T>

- Inherited from Query.takeUntil

  - Defined in query.ts:679

  Creates a subquery containing the first elements that do not match the supplied predicate.

  category

    Subquery

  #### Parameters

  - predicate: function —

    A callback used to match each element.

    - - (element: T): boolean

      - #### Parameters

        - element: T —

          The element to match.

        #### Returns boolean

  #### Returns UnorderedQueryFlow<this, T>

### takeWhile

- takeWhile<U>(predicate: function): UnorderedQueryFlow<this, U>
- takeWhile(predicate: function): UnorderedQueryFlow<this, T>

- Inherited from Query.takeWhile

  - Defined in query.ts:660

  Creates a subquery containing the first elements that match the supplied predicate.

  category

    Subquery

  #### Type parameters

  - U: T

  #### Parameters

  - predicate: function —

    A callback used to match each element.

    - - (element: T): boolean

      - #### Parameters

        - element: T —

          The element to match.

        #### Returns boolean

  #### Returns UnorderedQueryFlow<this, U>

- Inherited from Query.takeWhile

  - Defined in query.ts:667

  Creates a subquery containing the first elements that match the supplied predicate.

  #### Parameters

  - predicate: function —

    A callback used to match each element.

    - - (element: T): boolean

      - #### Parameters

        - element: T —

          The element to match.

        #### Returns boolean

  #### Returns UnorderedQueryFlow<this, T>

### tap

- tap(callback: function): UnorderedQueryFlow<this, T>

- Inherited from Query.tap

  - Defined in query.ts:562

  Lazily invokes a callback as each element of the Query is iterated.

  NOTE: This is an alias for do.

  category

    Subquery

  #### Parameters

  - callback: function —

    The callback to invoke.

    - - (element: T, offset: number): void

      - #### Parameters

        - element: T —

          An element of the source.

        - offset: number —

          The offset from the start of the source iterable.

        #### Returns void

  #### Returns UnorderedQueryFlow<this, T>

### through

- through<R>(callback: function): QueryFlow<R, QueriedType<R>>

- Inherited from Query.through

  - Defined in query.ts:1098

  Pass the entire Query to the provided callback, creating a new Query from the result.

  category

    Subquery

  #### Type parameters

  - R: Queryable<any>

  #### Parameters

  - callback: function —

    A callback function.

    - - (source: this): R

      - #### Parameters

        - source: this —

          The outer Query.

        #### Returns R

  #### Returns QueryFlow<R, QueriedType<R>>

### union

- union(right: Queryable<T>, equaler?: Equaler<T>): UnorderedQueryFlow<this, T>

- Inherited from Query.union

  - Defined in query.ts:752

  Creates a subquery for the set union of this Query and another Queryable.

  category

    Subquery

  #### Parameters

  - right: Queryable<T> —

    A Queryable object.

  - Optional equaler: Equaler<T> —

    An [[Equaler]] object used to compare equality.

  #### Returns UnorderedQueryFlow<this, T>

### unionBy

- unionBy<K>(right: Queryable<T>, keySelector: function, keyEqualer?: Equaler<K>): UnorderedQueryFlow<this, T>

- Inherited from Query.unionBy

  - Defined in query.ts:765

  Creates a subquery for the set union of this Query and another Queryable, where set identity is determined by the selected key.

  category

    Subquery

  #### Type parameters

  - K

  #### Parameters

  - right: Queryable<T> —

    A Queryable object.

  - keySelector: function —

    A callback used to select the key for each element.

    - - (element: T): K

      - #### Parameters

        - element: T —

          An element from which to select a key.

        #### Returns K

  - Optional keyEqualer: Equaler<K> —

    An [[Equaler]] object used to compare key equality.

  #### Returns UnorderedQueryFlow<this, T>

### where

- where<U>(predicate: function): UnorderedQueryFlow<this, U>
- where(predicate: function): UnorderedQueryFlow<this, T>

- Inherited from Query.where

  - Defined in query.ts:398

  Creates a subquery whose elements match the supplied predicate.

  NOTE: This is an alias for filter.

  category

    Subquery

  #### Type parameters

  - U: T

  #### Parameters

  - predicate: function —

    A callback used to match each element.

    - - (element: T, offset: number): boolean

      - #### Parameters

        - element: T —

          The element to test.

        - offset: number —

          The offset from the start of the source iterable.

        #### Returns boolean

  #### Returns UnorderedQueryFlow<this, U>

- Inherited from Query.where

  - Defined in query.ts:409

  Creates a subquery whose elements match the supplied predicate.

  NOTE: This is an alias for filter.

  category

    Subquery

  #### Parameters

  - predicate: function —

    A callback used to match each element.

    - - (element: T, offset: number): boolean

      - #### Parameters

        - element: T —

          The element to test.

        - offset: number —

          The offset from the start of the source iterable.

        #### Returns boolean

  #### Returns UnorderedQueryFlow<this, T>

### whereBy

- whereBy<K>(keySelector: function, predicate: function): UnorderedQueryFlow<this, T>

- Inherited from Query.whereBy

  - Defined in query.ts:426

  Creates a subquery where the selected key for each element matches the supplied predicate.

  NOTE: This is an alias for filterBy.

  category

    Subquery

  #### Type parameters

  - K

  #### Parameters

  - keySelector: function —

    A callback used to select the key for each element.

    - - (element: T): K

      - #### Parameters

        - element: T —

          The element from which to select a key.

        #### Returns K

  - predicate: function —

    A callback used to match each key.

    - - (key: K, offset: number): boolean

      - #### Parameters

        - key: K —

          The key to test.

        - offset: number —

          The offset from the start of the source iterable.

        #### Returns boolean

  #### Returns UnorderedQueryFlow<this, T>

### whereDefined

- whereDefined(): UnorderedQueryFlow<this, NonNullable<T>>
- whereDefined<K>(keySelector: function): UnorderedQueryFlow<this, T>

- Inherited from Query.whereDefined

  - Defined in query.ts:437

  Creates a subquery whose elements are neither `null` nor `undefined`.

  NOTE: This is an alias for filterDefined.

  category

    Subquery

  #### Returns UnorderedQueryFlow<this, NonNullable<T>>

- Inherited from Query.whereDefined

  - Defined in query.ts:447

  Creates a subquery where the selected key for each element is neither `null` nor `undefined`.

  NOTE: This is an alias for filterDefined.

  category

    Subquery

  #### Type parameters

  - K

  #### Parameters

  - keySelector: function —

    A callback used to select the key for each element.

    - - (element: T): K

      - #### Parameters

        - element: T —

          The element from which to select a key.

        #### Returns K

  #### Returns UnorderedQueryFlow<this, T>

### xor

- xor(right: Queryable<T>, equaler?: Equaler<T>): UnorderedQueryFlow<this, T>

- Inherited from Query.xor

  - Defined in query.ts:850

  Creates a subquery for the symmetric difference between this and another Queryable.

  NOTE: This is an alias for symmetricDifference.

  category

    Subquery

  #### Parameters

  - right: Queryable<T> —

    A Queryable object.

  - Optional equaler: Equaler<T> —

    An [[Equaler]] object used to compare equality.

  #### Returns UnorderedQueryFlow<this, T>

### xorBy

- xorBy<K>(right: Queryable<T>, keySelector: function, keyEqualer?: Equaler<K>): UnorderedQueryFlow<this, T>

- Inherited from Query.xorBy

  - Defined in query.ts:865

  Creates a subquery for the symmetric difference between this and another Queryable, where set identity is determined by the selected key.

  NOTE: This is an alias for symmetricDifferenceBy.

  category

    Subquery

  #### Type parameters

  - K

  #### Parameters

  - right: Queryable<T> —

    A Queryable object.

  - keySelector: function —

    A callback used to select the key for each element.

    - - (element: T): K

      - #### Parameters

        - element: T —

          An element from which to select a key.

        #### Returns K

  - Optional keyEqualer: Equaler<K> —

    An [[Equaler]] object used to compare key equality.

  #### Returns UnorderedQueryFlow<this, T>

## Methods (Order)

### orderBy

- orderBy<K>(keySelector: function, comparer?: Comparison<K> | Comparer<K>): OrderedQueryFlow<this, T>

- Inherited from Query.orderBy

  - Defined in query.ts:1180

  Creates an ordered subquery whose elements are sorted in ascending order by the provided key.

  category

    Order

  #### Type parameters

  - K

  #### Parameters

  - keySelector: function —

    A callback used to select the key for an element.

    - - (element: T): K

      - #### Parameters

        - element: T

        #### Returns K

  - Optional comparer: Comparison<K> | Comparer<K> —

    An optional callback used to compare two keys.

  #### Returns OrderedQueryFlow<this, T>

### orderByDescending

- orderByDescending<K>(keySelector: function, comparer?: Comparison<K> | Comparer<K>): OrderedQueryFlow<this, T>

- Inherited from Query.orderByDescending

  - Defined in query.ts:1191

  Creates an ordered subquery whose elements are sorted in descending order by the provided key.

  category

    Order

  #### Type parameters

  - K

  #### Parameters

  - keySelector: function —

    A callback used to select the key for an element.

    - - (element: T): K

      - #### Parameters

        - element: T

        #### Returns K

  - Optional comparer: Comparison<K> | Comparer<K> —

    An optional callback used to compare two keys.

  #### Returns OrderedQueryFlow<this, T>

### thenBy

- thenBy<K>(keySelector: function, comparer?: Comparison<K> | Comparer<K>): OrderedQuery<T>

- - Defined in query.ts:2285

  Creates a subsequent ordered subquery whose elements are sorted in ascending order by the provided key.

  category

    Order

  #### Type parameters

  - K

  #### Parameters

  - keySelector: function —

    A callback used to select the key for an element.

    - - (element: T): K

      - #### Parameters

        - element: T

        #### Returns K

  - Optional comparer: Comparison<K> | Comparer<K> —

    An optional callback used to compare two keys.

  #### Returns OrderedQuery<T>

### thenByDescending

- thenByDescending<K>(keySelector: function, comparer?: Comparison<K> | Comparer<K>): OrderedQuery<T>

- - Defined in query.ts:2296

  Creates a subsequent ordered subquery whose elements are sorted in descending order by the provided key.

  category

    Order

  #### Type parameters

  - K

  #### Parameters

  - keySelector: function —

    A callback used to select the key for an element.

    - - (element: T): K

      - #### Parameters

        - element: T

        #### Returns K

  - Optional comparer: Comparison<K> | Comparer<K> —

    An optional callback used to compare two keys.

  #### Returns OrderedQuery<T>

## Methods (Join)

### fullJoin

- fullJoin<I, K, R>(inner: Queryable<I>, outerKeySelector: function, innerKeySelector: function, resultSelector: function, keyEqualer?: Equaler<K>): Query<R>

- Inherited from Query.fullJoin

  - Defined in query.ts:1144

  Creates a subquery for the correlated elements of this Query and another Queryable.

  category

    Join

  #### Type parameters

  - I
  - K
  - R

  #### Parameters

  - inner: Queryable<I> —

    A Queryable object.

  - outerKeySelector: function —

    A callback used to select the key for an element in this Query.

    - - (element: T): K

      - #### Parameters

        - element: T

        #### Returns K

  - innerKeySelector: function —

    A callback used to select the key for an element in the other Queryable.

    - - (element: I): K

      - #### Parameters

        - element: I

        #### Returns K

  - resultSelector: function —

    A callback used to select the result for the correlated elements.

    - - (outer: T | undefined, inner: I | undefined): R

      - #### Parameters

        - outer: T | undefined
        - inner: I | undefined

        #### Returns R

  - Optional keyEqualer: Equaler<K> —

    An [[Equaler]] object used to compare key equality.

  #### Returns Query<R>

### groupJoin

- groupJoin<I, K, R>(inner: Queryable<I>, outerKeySelector: function, innerKeySelector: function, resultSelector: function, keyEqualer?: Equaler<K>): Query<R>

- Inherited from Query.groupJoin

  - Defined in query.ts:1116

  Creates a grouped subquery for the correlated elements of this Query and another Queryable object.

  category

    Join

  #### Type parameters

  - I
  - K
  - R

  #### Parameters

  - inner: Queryable<I> —

    A Queryable object.

  - outerKeySelector: function —

    A callback used to select the key for an element in this Query.

    - - (element: T): K

      - #### Parameters

        - element: T

        #### Returns K

  - innerKeySelector: function —

    A callback used to select the key for an element in the other Queryable object.

    - - (element: I): K

      - #### Parameters

        - element: I

        #### Returns K

  - resultSelector: function —

    A callback used to select the result for the correlated elements.

    - - (outer: T, inner: Query<I>): R

      - #### Parameters

        - outer: T
        - inner: Query<I>

        #### Returns R

  - Optional keyEqualer: Equaler<K> —

    An [[Equaler]] object used to compare key equality.

  #### Returns Query<R>

### join

- join<I, K, R>(inner: Queryable<I>, outerKeySelector: function, innerKeySelector: function, resultSelector: function, keyEqualer?: Equaler<K>): Query<R>

- Inherited from Query.join

  - Defined in query.ts:1130

  Creates a subquery for the correlated elements of this Query and another Queryable.

  category

    Join

  #### Type parameters

  - I
  - K
  - R

  #### Parameters

  - inner: Queryable<I> —

    A Queryable object.

  - outerKeySelector: function —

    A callback used to select the key for an element in this Query.

    - - (element: T): K

      - #### Parameters

        - element: T

        #### Returns K

  - innerKeySelector: function —

    A callback used to select the key for an element in the other Queryable.

    - - (element: I): K

      - #### Parameters

        - element: I

        #### Returns K

  - resultSelector: function —

    A callback used to select the result for the correlated elements.

    - - (outer: T, inner: I): R

      - #### Parameters

        - outer: T
        - inner: I

        #### Returns R

  - Optional keyEqualer: Equaler<K> —

    An [[Equaler]] object used to compare key equality.

  #### Returns Query<R>

### zip

- zip<U>(right: Queryable<U>): Query<[T, U]>
- zip<U, R>(right: Queryable<U>, selector: function): Query<R>

- Inherited from Query.zip

  - Defined in query.ts:1155

  Creates a subquery that combines this Query with another Queryable by combining elements in tuples.

  category

    Join

  #### Type parameters

  - U

  #### Parameters

  - right: Queryable<U> —

    A Queryable object.

  #### Returns Query<[T, U]>

- Inherited from Query.zip

  - Defined in query.ts:1164

  Creates a subquery that combines this Query with another Queryable by combining elements using the supplied callback.

  category

    Join

  #### Type parameters

  - U
  - R

  #### Parameters

  - right: Queryable<U> —

    A Queryable object.

  - selector: function —

    A callback used to combine two elements.

    - - (left: T, right: U): R

      - #### Parameters

        - left: T
        - right: U

        #### Returns R

  #### Returns Query<R>

## Methods (Hierarchy)

### toHierarchy

- toHierarchy(hierarchy: HierarchyProvider<T>): HierarchyQueryFlow<this, T>

- Inherited from Query.toHierarchy

  - Defined in query.ts:1205

  Creates a HierarchyQuery using the provided HierarchyProvider.

  category

    Hierarchy

  #### Parameters

  - hierarchy: HierarchyProvider<T> —

    A HierarchyProvider.

  #### Returns HierarchyQueryFlow<this, T>

## Methods ()

### [OrderedIterable.thenBy]

- [OrderedIterable.thenBy]<K>(keySelector: function, comparer: Comparison<K> | Comparer<K>, descending: boolean): OrderedIterable<T>

- - Defined in query.ts:2302

  #### Type parameters

  - K

  #### Parameters

  - keySelector: function
    - - (element: T): K

      - #### Parameters

        - element: T

        #### Returns K

  - comparer: Comparison<K> | Comparer<K>
  - descending: boolean

  #### Returns OrderedIterable<T>

### [Symbol.iterator]

- [Symbol.iterator](): Iterator<T>

- Implementation of OrderedIterable.[Symbol.iterator]

  Inherited from Query.[Symbol.iterator]

  - Defined in query.ts:1893

  #### Returns Iterator<T>

### toJSON

- toJSON(): T[]

- Inherited from Query.toJSON

  - Defined in query.ts:1887

  #### Returns T[]

Generated using TypeDoc