1 | /**
|
2 | * The options for calculating an average.
|
3 | *
|
4 | * @export
|
5 | * @interface MathOptions
|
6 | * @template T The type of elements in the source sequence.
|
7 | */
|
8 | export interface MathOptions<T> {
|
9 | /**
|
10 | * An optional selector used to get the value to average.
|
11 | *
|
12 | * @memberof MathOptions
|
13 | */
|
14 | selector?: (x: T, signal?: AbortSignal) => number | Promise<number>;
|
15 | /**
|
16 | * An optional thisArg for the selector.
|
17 | *
|
18 | * @type {*}
|
19 | * @memberof MathOptions
|
20 | */
|
21 | thisArg?: any;
|
22 | /**
|
23 | * An optional abort signal to cancel the operation at any time.
|
24 | *
|
25 | * @type {AbortSignal}
|
26 | * @memberof MathOptions
|
27 | */
|
28 | signal?: AbortSignal;
|
29 | }
|