Options
All
  • Public
  • Public/Protected
  • All
Menu

InterLINQed

Index

Type aliases

Accumulator

Accumulator<T, U, R>: (acc: U, value: T, index: number) => R

Type parameters

  • T

  • U

  • R = any

Type declaration

    • (acc: U, value: T, index: number): R
    • Parameters

      • acc: U
      • value: T
      • index: number

      Returns R

Comparison

Comparison<T>: (x: T, y: T) => number

Type parameters

  • T = any

Type declaration

    • (x: T, y: T): number
    • Parameters

      • x: T
      • y: T

      Returns number

Constructor

Constructor<T>: { constructor: any } | (() => T)

Type parameters

  • T = any

ConstructorType

ConstructorType<T>: T extends Constructor<infer V> ? V : never

Type parameters

  • T = any

Flow

Flow<T, R>: (a: T) => R

Type parameters

  • T

  • R

Type declaration

    • (a: T): R
    • Parameters

      • a: T

      Returns R

Key

Key<T, TReturn>: (key: T) => TReturn

Type parameters

  • T = any

  • TReturn = string | number

Type declaration

    • (key: T): TReturn
    • Parameters

      • key: T

      Returns TReturn

Result

Result<T, U, TResult>: (a: T, b: U) => TResult

Type parameters

  • T

  • U

  • TResult

Type declaration

    • (a: T, b: U): TResult
    • Parameters

      • a: T
      • b: U

      Returns TResult

Selector

Selector<T, TResult>: (element: T, index: number) => TResult

Type parameters

  • T

  • TResult

Type declaration

    • (element: T, index: number): TResult
    • Parameters

      • element: T
      • index: number

      Returns TResult

Functions

Aggregate

  • Aggregate<T, U, R>(source: T[], accumulator: Accumulator<T, U, R>): R
  • Aggregate<T, U>(source: T[], seed: U, accumulator: Accumulator<T, U>): U
  • Applies an accumulator function over an array.

    Type parameters

    • T

    • U

    • R = any

    Parameters

    • source: T[]

      An array to aggregate over.

    • accumulator: Accumulator<T, U, R>

      An accumulator function to be invoked on each element.

    Returns R

    The transformed final accumulator value.

  • Type parameters

    • T

    • U

    Parameters

    Returns U

All

  • All<T>(source: T[], predicate: Predicate<T>): boolean
  • Determines whether all elements of an array satisfy a condition.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array that contains the elements to apply the predicate to.

    • predicate: Predicate<T>

      A function to test each element for a condition.

    Returns boolean

    true if every element of the source array passes the test in the specified predicate, or if the array is empty; otherwise, false.

Any

  • Any<T>(source: T[], predicate?: Predicate<T>): boolean
  • Determines whether an array contains any elements.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array whose elements to apply the predicate to. Or to check for emptiness.

    • Optional predicate: Predicate<T>

      A function to test each element for a condition.

    Returns boolean

    true if the source array is not empty and at least one of its elements passes the test in the specified predicate; otherwise, false.

Average

  • Average<T>(source: T[], selector?: Selector<T, number>): number
  • Computes the average of an array of numbers that are obtained by invoking a transform function on each element of the input array.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array that are used to calculate an average.

    • Optional selector: Selector<T, number>

      A transform function to apply to each element.

    Returns number

    The average of the array.

Cast

  • Cast<T>(source: any[]): T[]
  • Casts the elements of an array to the specified type. Note: only casts through typescript, does not actually cast each individual element.

    Type parameters

    • T

    Parameters

    • source: any[]

      The array that contains the elements to be cast to type T.

    Returns T[]

    An array that contains each element of the source array cast to the specified type.

Contains

  • Contains<T>(source: T[], value: T): boolean
  • Determines whether an array contains a specified element by using the default equality comparer.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array in which to locate a value.

    • value: T

      The value to locate in the array.

    Returns boolean

    true if the source array contains an element that has the specified value; otherwise, false.

Count

  • Count<T>(source: T[], predicate?: Predicate<T>): number
  • Returns a number that represents how many elements in the specified array satisfy a condition.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array that contains elements to be counted.

    • Optional predicate: Predicate<T>

      A function to test each element for a condition.

    Returns number

    A number that represents how many elements in the array satisfy the condition in the predicate function.

DefaultIfEmpty

  • DefaultIfEmpty<T>(source: T[], defaultValue?: T): T[]
  • Returns the elements of the specified array or the type parameter's default value in a singleton collection if the array is empty.

    Type parameters

    • T

    Parameters

    • source: T[]

      The array to return the specified value for if it is empty.

    • Optional defaultValue: T

      The value to return if the array is empty.

    Returns T[]

    An array that contains defaultValue if source is empty; otherwise, source.

Distinct

  • Distinct<T>(source: T[]): T[]
  • Returns distinct elements from a array by using the default equality comparer to compare values.

    Type parameters

    • T

    Parameters

    • source: T[]

      The array to remove duplicate elements from.

    Returns T[]

    An array that contains distinct elements from the source array.

DistinctBy

  • DistinctBy<T>(source: T[], keySelector: Key<T>): T[]
  • Returns distinct elements from an array according to a specified key selector.

    Type parameters

    • T

    Parameters

    • source: T[]

      The array to remove duplicate elements from.

    • keySelector: Key<T>

      A function to extract the key for each element.

    Returns T[]

    An array that contains distinct elements from the source array, according to the specified key selector.

ElementAt

  • ElementAt<T>(source: T[], index: number): T | null
  • Returns the element at a specified index in a array or null if the index is out of range.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array to return an element from.

    • index: number

      The zero-based index of the element to retrieve.

    Returns T | null

    null if the index is outside the bounds of the source array; otherwise, the element at the specified position in the source array.

Except

  • Except<T>(first: T[], second: T[]): T[]
  • Produces the set difference of two arrays by using the default equality comparer to compare values.

    Type parameters

    • T

    Parameters

    • first: T[]

      An array whose elements that are not also in second will be returned.

    • second: T[]

      An array whose elements that also occur in the first array will cause those elements to be removed from the returned array.

    Returns T[]

    A array that contains the set difference of the elements of two arrays.

First

  • First<T>(source: T[], predicate?: Predicate<T>): T | null
  • Returns the first element in an array that satisfies a specified condition, or null if the array contains no elements.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array to return an element from.

    • Optional predicate: Predicate<T>

      A function to test each element for a condition.

    Returns T | null

    The first element in the array that passes the test in the specified predicate function, or null if no element was matched.

GroupBy

  • GroupBy<T, TResult>(source: T[], keySelector: Key<T>, resultSelector?: (element: T) => TResult): Record<string, TResult[]>
  • Groups the elements of an array according to a specified key selector function.

    Type parameters

    • T

    • TResult = T

    Parameters

    • source: T[]

      An array whose elements to group.

    • keySelector: Key<T>

      A function to extract the key for each element.

    • Optional resultSelector: (element: T) => TResult

      A function to create a result value from each group.

        • (element: T): TResult
        • Parameters

          • element: T

          Returns TResult

    Returns Record<string, TResult[]>

    An object of elements of type TResult where each element represents a projection over a group and its key.

GroupJoin

  • GroupJoin<TInner, TOuter, TKey, TResult>(inner: TInner[], outer: TOuter[], innerKeySelector: Key<TInner, TKey>, outerKeySelector: Key<TOuter, TKey>, resultSelector: Result<TInner, TOuter[], TResult>): TResult[]
  • Correlates the elements of two arrays based on equality of keys and groups the results. The default equality comparer is used to compare keys.

    Type parameters

    • TInner

    • TOuter

    • TKey

    • TResult

    Parameters

    • inner: TInner[]

      The first array to join.

    • outer: TOuter[]

      The array to join to the first array.

    • innerKeySelector: Key<TInner, TKey>

      A function to extract the join key from each element of the first array.

    • outerKeySelector: Key<TOuter, TKey>

      A function to extract the join key from each element of the second array.

    • resultSelector: Result<TInner, TOuter[], TResult>

      A function to create a result element from an element from the first array. and a collection of matching elements from the second array.

    Returns TResult[]

    An array that contains elements of type TResult that are obtained by performing a grouped join on two arrays.

Insert

  • Insert<T>(source: T[], index: number, ...items: T[]): void
  • Inserts an element into the T[] at the specified index.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array in which to insert items into.

    • index: number

      The zero-based index at which item should be inserted.

    • Rest ...items: T[]

      The objects to insert into the array.

    Returns void

Intersect

  • Intersect<T>(first: T[], second: T[]): T[]
  • Produces the set intersection of two arrays by using the default equality comparer to compare values.

    Type parameters

    • T

    Parameters

    • first: T[]

      An array whose distinct elements that also appear in second will be returned.

    • second: T[]

      An array whose distinct elements that also appear in the first array will be returned.

    Returns T[]

    An array that contains the elements that form the set intersection of two arrays.

Join

  • Join<TInner, TOuter, TKey, TResult>(inner: TInner[], outer: TOuter[], innerKeySelector: Key<TInner, TKey>, outerKeySelector: Key<TOuter, TKey>, resultSelector: Result<TInner, TOuter, TResult>): TResult[]
  • Correlates the elements of two arrays based on matching keys. The default equality comparer is used to compare keys.

    Type parameters

    • TInner

    • TOuter

    • TKey

    • TResult

    Parameters

    • inner: TInner[]

      The first array to join.

    • outer: TOuter[]

      The array to join to the first array.

    • innerKeySelector: Key<TInner, TKey>

      A function to extract the join key from each element of the first array.

    • outerKeySelector: Key<TOuter, TKey>

      A function to extract the join key from each element of the second array.

    • resultSelector: Result<TInner, TOuter, TResult>

      A function to create a result element from two matching elements.

    Returns TResult[]

    An array that has elements of type TResult that are obtained by performing an inner join on two arrays.

Last

  • Last<T>(source: T[], predicate?: Predicate<T>): T
  • Returns the last element of an array that satisfies a specified condition.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array to return an element from.

    • Optional predicate: Predicate<T>

      A function to test each element for a condition.

    Returns T

    The last element in the array that passes the test in the specified predicate function. Or null if no element was matched.

Linq

  • Linq<A, R1>(source: A, f1: Flow<A, R1>): R1
  • Linq<A, R1, R2>(source: A, f1: Flow<A, R1>, f2: Flow<R1, R2>): R2
  • Linq<A, R1, R2, R3>(source: A, f1: Flow<A, R1>, f2: Flow<R1, R2>, f3: Flow<R2, R3>): R3
  • Linq<A, R1, R2, R3, R4>(source: A, f1: Flow<A, R1>, f2: Flow<R1, R2>, f3: Flow<R2, R3>, f4: Flow<R3, R4>): R4
  • Linq<A, R1, R2, R3, R4, R5>(source: A, f1: Flow<A, R1>, f2: Flow<R1, R2>, f3: Flow<R2, R3>, f4: Flow<R3, R4>, f5: Flow<R4, R5>): R5
  • Linq<A, R1, R2, R3, R4, R5, R6>(source: A, f1: Flow<A, R1>, f2: Flow<R1, R2>, f3: Flow<R2, R3>, f4: Flow<R3, R4>, f5: Flow<R4, R5>, f6: Flow<R5, R6>): R6
  • Linq<A, R1, R2, R3, R4, R5, R6, R7, R8>(source: A, f1: Flow<A, R1>, f2: Flow<R1, R2>, f3: Flow<R2, R3>, f4: Flow<R3, R4>, f5: Flow<R4, R5>, f6: Flow<R5, R6>, f7: Flow<R6, R7>, f8: Flow<R7, R8>): R8
  • Linq<A, R1, R2, R3, R4, R5, R6, R7, R8, R9>(source: A, f1: Flow<A, R1>, f2: Flow<R1, R2>, f3: Flow<R2, R3>, f4: Flow<R3, R4>, f5: Flow<R4, R5>, f6: Flow<R5, R6>, f7: Flow<R6, R7>, f8: Flow<R7, R8>, f9: Flow<R7, R9>): R9
  • Creates a Linq chain which feeds the return value from the previous function into the next function.

    Type parameters

    • A: any[]

    • R1

    Parameters

    • source: A

      Initial array as the beginning of the entire Linq chain.

    • f1: Flow<A, R1>

    Returns R1

    The result of the last function within the chain.

  • Type parameters

    • A: any[]

    • R1

    • R2

    Parameters

    • source: A
    • f1: Flow<A, R1>
    • f2: Flow<R1, R2>

    Returns R2

  • Type parameters

    • A: any[]

    • R1

    • R2

    • R3

    Parameters

    • source: A
    • f1: Flow<A, R1>
    • f2: Flow<R1, R2>
    • f3: Flow<R2, R3>

    Returns R3

  • Type parameters

    • A: any[]

    • R1

    • R2

    • R3

    • R4

    Parameters

    Returns R4

  • Type parameters

    • A: any[]

    • R1

    • R2

    • R3

    • R4

    • R5

    Parameters

    Returns R5

  • Type parameters

    • A: any[]

    • R1

    • R2

    • R3

    • R4

    • R5

    • R6

    Parameters

    Returns R6

  • Type parameters

    • A: any[]

    • R1

    • R2

    • R3

    • R4

    • R5

    • R6

    • R7

    • R8

    Parameters

    Returns R8

  • Type parameters

    • A: any[]

    • R1

    • R2

    • R3

    • R4

    • R5

    • R6

    • R7

    • R8

    • R9

    Parameters

    Returns R9

Max

  • Max<T>(source: T[], selector?: Selector<T, number>): number
  • Returns the maximum value in an array of numbers. Optionally with a element transform function.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array of values to determine the maximum value of.

    • Optional selector: Selector<T, number>

      A transform function to apply to each element.

    Returns number

    A number that corresponds to the maximum value in the array.

Min

  • Min<T>(source: T[], selector?: Selector<T, number>): number
  • Returns the minimum value in an array of numbers. Optionally with a element transform function.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array of values to determine the minimum value of.

    • Optional selector: Selector<T, number>

      A transform function to apply to each element.

    Returns number

    A number that corresponds to the minimum value in the array.

New

  • New<T>(expression?: boolean): Expression<T>
  • New<T>(expression?: Predicate<T>): Expression<T>
  • Starts an expression

    Type parameters

    • T = any

    Parameters

    • Optional expression: boolean

      Default expression, could be a boolean indicating the default return value

    Returns Expression<T>

    The started expression

  • Type parameters

    • T = any

    Parameters

    Returns Expression<T>

OfType

  • Filters the elements of an array based on a specified type.

    Type parameters

    Parameters

    • source: T[]

      The array whose elements to filter.

    • type: U

      The type to filter the elements of the array on.

    Returns ConstructorType<U>[]

    An array that contains elements from the input array of type.

OrderBy

  • OrderBy<T, TReturn>(list: T[], key: Key<T, TReturn>, ...comparisons: Comparison<T>[]): T[]
  • Sorts the elements of a sequence in ascending order according to key/keys.

    Type parameters

    • T

    • TReturn = any

    Parameters

    • list: T[]

      A sequence of values to order.

    • key: Key<T, TReturn>

      A function to extract a key from an element.

    • Rest ...comparisons: Comparison<T>[]

      A set of functions to use if the last comparison was equal.

    Returns T[]

    An array whose elements are sorted according the key/keys.

OrderByDescending

  • OrderByDescending<T, TReturn>(list: T[], key: Key<T, TReturn>, ...comparisons: Comparison<T>[]): T[]
  • Sorts the elements of a sequence in descending order according to key/keys.

    Type parameters

    • T

    • TReturn = any

    Parameters

    • list: T[]

      A sequence of values to order.

    • key: Key<T, TReturn>

      A function to extract a key from an element.

    • Rest ...comparisons: Comparison<T>[]

      A set of functions to use if the last comparison was equal.

    Returns T[]

    An array whose elements are sorted according the key/keys.

Range

  • Range(start: number, count: number): number[]
  • Generates an array of integral numbers within a specified range.

    Parameters

    • start: number

      The value of the first integer in the array.

    • count: number

      The number of sequential integers to generate.

    Returns number[]

    An array that contains a range of sequential integral numbers.

Remove

  • Remove<T>(source: T[], item: T): boolean
  • Removes the first occurrence of a specific object from the array.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array in which to remove item from.

    • item: T

      The object to remove from the array.

    Returns boolean

    true if item is successfully removed; otherwise, false. This method also returns false if item was not found in the array.

RemoveAt

  • RemoveAt<T>(source: T[], index: number): void
  • Removes the array item at the specified index.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array in which to remove item from.

    • index: number

      The zero-based index of the item to remove.

    Returns void

Repeat

  • Repeat<T>(element: T, count: number): T[]
  • Generates an array that contains one repeated value.

    Type parameters

    • T

    Parameters

    • element: T

      The value to be repeated.

    • count: number

      The number of times to repeat the value in the generated array.

    Returns T[]

    An array that contains a repeated value.

Reverse

  • Reverse<T>(source: T[]): void
  • Reverse<T>(source: T[], index: number, count: number): void
  • Reverses the order of the elements in the array or a portion of it.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array in which to reverse.

    Returns void

  • Type parameters

    • T

    Parameters

    • source: T[]
    • index: number
    • count: number

    Returns void

Select

  • Select<T, TResult>(source: T[], selector: Selector<T, TResult>): TResult[]
  • Projects each element of a array into a new form.

    Type parameters

    • T

    • TResult

    Parameters

    • source: T[]

      An array of values to invoke a transform function on.

    • selector: Selector<T, TResult>

      A transform function to apply to each element.

    Returns TResult[]

    An array whose elements are the result of invoking the transform function on each element of source.

SelectMany

  • SelectMany<TSource, TResult>(source: TSource[], collectionSelector: Selector<TSource, TResult>): TResult
  • SelectMany<TSource, TCollection, TResult>(source: TSource[], collectionSelector: Selector<TSource, TCollection>, resultSelector: Selector<TCollection, TResult>): TResult[]
  • Projects each element of a array to an array, flattens the resulting arrays into one array, and invokes a result selector function on each element therein.

    Type parameters

    • TSource

    • TResult: any[]

    Parameters

    • source: TSource[]

      An array of values to project.

    • collectionSelector: Selector<TSource, TResult>

      A transform function to apply to each element; the second parameter of the function represents the index of the element.

    Returns TResult

    An array whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of and then mapping each of those array elements and their corresponding element to a result element.

  • Type parameters

    • TSource

    • TCollection: any[]

    • TResult: any

    Parameters

    • source: TSource[]
    • collectionSelector: Selector<TSource, TCollection>
    • resultSelector: Selector<TCollection, TResult>

    Returns TResult[]

SequenceEqual

  • SequenceEqual<T>(first: T[], second: T[]): boolean
  • Determines whether two arrays are equal by comparing the elements by using the default equality comparer for their type.

    Type parameters

    • T

    Parameters

    • first: T[]

      An array to compare to second.

    • second: T[]

      An array to compare to the first array.

    Returns boolean

    true if the two source arrays are of equal length and their corresponding elements are equal according to the default equality comparer for their type; otherwise, false.

Single

  • Single<T>(source: T[], predicate?: Predicate<T>): T
  • Returns the only element of an array, or a default value if the array is empty; this method throws an exception if there is more than one element in the array.

    throws

    {TypeError} If source array has more than 1 element

    Type parameters

    • T

    Parameters

    • source: T[]

      An array to return a single element from.

    • Optional predicate: Predicate<T>

      A function to test an element for a condition.

    Returns T

    The single element of the input array that satisfies a condition. Returns null if sourceis empty

Skip

  • Skip<T>(source: T[], count: number): T[]
  • Bypasses a specified number of elements in an array and then returns the remaining elements.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array to return elements from.

    • count: number

      The number of elements to skip before returning the remaining elements.

    Returns T[]

    An array that contains the elements that occur after the specified index in the input array.

SkipLast

  • SkipLast<T>(source: T[], count: number): T[]
  • Returns a new array that contains the elements from source with the last count elements of the source array omitted.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array instance.

    • count: number

      The number of elements to omit from the end of the array.

    Returns T[]

    A new array that contains the elements from source minus count elements from the end of the array.

SkipWhile

  • SkipWhile<T>(source: T[], predicate: Predicate<T>): T[]
  • Bypasses elements in an array as long as a specified condition is true and then returns the remaining elements.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array to return elements from.

    • predicate: Predicate<T>

      A function to test each element for a condition.

    Returns T[]

    An array that contains the elements from the input array starting at the first element in the linear series that does not pass the test specified by predicate.

Sum

  • Sum<T>(source: T[], transform?: Selector<T, number>): number | null
  • Computes the sum of the array of number values that are obtained by invoking a transform function on each element of the input array.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array of values that are used to calculate a sum.

    • Optional transform: Selector<T, number>

      A transform function to apply to each element.

    Returns number | null

    The sum of the projected values.

Take

  • Take<T>(source: T[], count: number): T[]
  • Returns a specified number of contiguous elements from the start of a array.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array to return elements from.

    • count: number

      The number of elements to return.

    Returns T[]

    An array that contains the specified number of elements from the start of the input array.

TakeLast

  • TakeLast<T>(source: T[], count: number): T[]
  • Returns a specified number of contiguous elements from the end of a array.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array instance.

    • count: number

      A new array that contains the elements from source minus count elements from the end of the array.

    Returns T[]

    A new array that contains the last count elements from source.

TakeWhile

  • TakeWhile<T>(source: T[], predicate: Predicate<T>): T[]
  • Returns elements from an array as long as a specified condition is true.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array to return elements from.

    • predicate: Predicate<T>

      A function to test each element for a condition.

    Returns T[]

    An array that contains the elements from the input array that occur before the element at which the test no longer passes.

ThenBy

  • Performs a subsequent ordering of the elements in a sequence in ascending order, according to a key.

    Type parameters

    • T

    • TReturn = any

    Parameters

    • key: Key<T, TReturn>

      A function to extract a key from each element.

    Returns Comparison<T>

    A Comparison function to use with OrderBy or OrderByDescending.

ThenByDescending

  • ThenByDescending<T, TReturn>(key: Key<T, TReturn>): Comparison<T>
  • Performs a subsequent ordering of the elements in a sequence in descending order, according to a key.

    Type parameters

    • T

    • TReturn = any

    Parameters

    • key: Key<T, TReturn>

      A function to extract a key from each element.

    Returns Comparison<T>

    A Comparison function to use with OrderBy or OrderByDescending.

ToObject

  • ToObject<T, TKey>(source: T[], keySelector: (key: T) => TKey): Record<TKey, T>
  • ToObject<T, TKey, TValue>(source: T[], keySelector: (key: T) => TKey, valueSelector: (value: T) => TValue): Record<TKey, TValue>
  • Creates an object as a map with TKey as key and TValue as value from a T[] according to a specified key selector function.

    Type parameters

    • T

    • TKey: string | number

    Parameters

    • source: T[]

      An array to create an object from

    • keySelector: (key: T) => TKey

      A function to extract a key from each element.

        • (key: T): TKey
        • Parameters

          • key: T

          Returns TKey

    Returns Record<TKey, T>

    An object that contains values of type TValue selected from the input array.

  • Type parameters

    • T

    • TKey: string | number

    • TValue

    Parameters

    • source: T[]
    • keySelector: (key: T) => TKey
        • (key: T): TKey
        • Parameters

          • key: T

          Returns TKey

    • valueSelector: (value: T) => TValue
        • (value: T): TValue
        • Parameters

          • value: T

          Returns TValue

    Returns Record<TKey, TValue>

Union

  • Union<T>(first: T[], second: T[]): T[]
  • Produces the set union of two arrays by using the default equality comparer.

    Type parameters

    • T

    Parameters

    • first: T[]

      An array whose distinct elements form the first set for the union.

    • second: T[]

      An array whose distinct elements form the second set for the union.

    Returns T[]

    An array that contains the elements from both input arrays, excluding duplicates.

Where

  • Where<T>(source: T[], predicate: Predicate<T>): T[]
  • Filters a array of values based on a predicate.

    Type parameters

    • T

    Parameters

    • source: T[]

      An array to filter.

    • predicate: Predicate<T>

      A function to test each element for a condition.

    Returns T[]

    An array that contains elements from the input array that satisfy the condition.

Zip

  • Zip<T, U, TResult>(first: T[], second: U[], resultSelector: Result<T, U, TResult>): TResult[]
  • Applies a specified function to the corresponding elements of two arrays, producing a array of the results.

    Type parameters

    • T

    • U

    • TResult

    Parameters

    • first: T[]

      The first array to merge.

    • second: U[]

      The second sequence to merge.

    • resultSelector: Result<T, U, TResult>

      A function that specifies how to merge the elements from the two arrays.

    Returns TResult[]

    An array that contains merged elements of two input arrays.

Generated using TypeDoc