@types/d3-array
Advanced tools
Comparing version 2.12.4 to 2.12.5
@@ -47,3 +47,3 @@ // Type definitions for D3JS d3-array module 2.12 | ||
iterable: Iterable<T>, | ||
accessor: (datum: T, index: number, array: Iterable<T>) => string | undefined | null | ||
accessor: (datum: T, index: number, array: Iterable<T>) => string | undefined | null, | ||
): string | undefined; | ||
@@ -55,3 +55,3 @@ /** | ||
iterable: Iterable<T>, | ||
accessor: (datum: T, index: number, array: Iterable<T>) => U | undefined | null | ||
accessor: (datum: T, index: number, array: Iterable<T>) => U | undefined | null, | ||
): U | undefined; | ||
@@ -68,3 +68,3 @@ | ||
iterable: Iterable<TDatum>, | ||
accessor: (datum: TDatum, index: number, array: Iterable<TDatum>) => U | undefined | null | ||
accessor: (datum: TDatum, index: number, array: Iterable<TDatum>) => U | undefined | null, | ||
): number; | ||
@@ -89,3 +89,3 @@ /** | ||
iterable: Iterable<T>, | ||
accessor: (datum: T, index: number, array: Iterable<T>) => string | undefined | null | ||
accessor: (datum: T, index: number, array: Iterable<T>) => string | undefined | null, | ||
): string | undefined; | ||
@@ -97,3 +97,3 @@ /** | ||
iterable: Iterable<T>, | ||
accessor: (datum: T, index: number, array: Iterable<T>) => U | undefined | null | ||
accessor: (datum: T, index: number, array: Iterable<T>) => U | undefined | null, | ||
): U | undefined; | ||
@@ -110,3 +110,3 @@ | ||
iterable: Iterable<TDatum>, | ||
accessor: (datum: TDatum, index: number, array: Iterable<TDatum>) => U | undefined | null | ||
accessor: (datum: TDatum, index: number, array: Iterable<TDatum>) => U | undefined | null, | ||
): number; | ||
@@ -127,3 +127,3 @@ | ||
iterable: Iterable<T>, | ||
accessor: (datum: T, index: number, array: Iterable<T>) => string | undefined | null | ||
accessor: (datum: T, index: number, array: Iterable<T>) => string | undefined | null, | ||
): [string, string] | [undefined, undefined]; | ||
@@ -135,3 +135,3 @@ /** | ||
iterable: Iterable<T>, | ||
accessor: (datum: T, index: number, array: Iterable<T>) => U | undefined | null | ||
accessor: (datum: T, index: number, array: Iterable<T>) => U | undefined | null, | ||
): [U, U] | [undefined, undefined]; | ||
@@ -148,3 +148,3 @@ | ||
iterable: Iterable<T>, | ||
accessor: (datum: T, index: number, array: Iterable<T>) => number | undefined | null | ||
accessor: (datum: T, index: number, array: Iterable<T>) => number | undefined | null, | ||
): number; | ||
@@ -161,3 +161,3 @@ | ||
iterable: Iterable<T>, | ||
accessor: (datum: T, index: number, array: Iterable<T>) => number | undefined | null | ||
accessor: (datum: T, index: number, array: Iterable<T>) => number | undefined | null, | ||
): number | undefined; | ||
@@ -174,3 +174,3 @@ | ||
iterable: Iterable<T>, | ||
accessor: (element: T, i: number, array: Iterable<T>) => number | undefined | null | ||
accessor: (element: T, i: number, array: Iterable<T>) => number | undefined | null, | ||
): number | undefined; | ||
@@ -193,3 +193,3 @@ | ||
iterable: Iterable<T>, | ||
accessor: (element: T, i: number, array: Iterable<T>) => number | undefined | null | ||
accessor: (element: T, i: number, array: Iterable<T>) => number | undefined | null, | ||
): Float64Array; | ||
@@ -211,3 +211,3 @@ | ||
p: number, | ||
accessor: (element: T, i: number, array: Iterable<T>) => number | undefined | null | ||
accessor: (element: T, i: number, array: Iterable<T>) => number | undefined | null, | ||
): number | undefined; | ||
@@ -221,3 +221,3 @@ | ||
array: Array<T | undefined | null>, | ||
p: number | ||
p: number, | ||
): number | undefined; | ||
@@ -231,3 +231,3 @@ /** | ||
p: number, | ||
accessor: (element: T, i: number, array: T[]) => number | undefined | null | ||
accessor: (element: T, i: number, array: T[]) => number | undefined | null, | ||
): number | undefined; | ||
@@ -250,3 +250,3 @@ | ||
iterable: Iterable<T>, | ||
accessor: (datum: T, index: number, array: Iterable<T>) => number | undefined | null | ||
accessor: (datum: T, index: number, array: Iterable<T>) => number | undefined | null, | ||
): number | undefined; | ||
@@ -264,3 +264,3 @@ | ||
iterable: Iterable<T>, | ||
accessor: (datum: T, index: number, array: Iterable<T>) => number | undefined | null | ||
accessor: (datum: T, index: number, array: Iterable<T>) => number | undefined | null, | ||
): number | undefined; | ||
@@ -279,3 +279,3 @@ | ||
values: Iterable<T>, | ||
accessor: (datum: T, index: number, array: Iterable<T>) => number | undefined | null | ||
accessor: (datum: T, index: number, array: Iterable<T>) => number | undefined | null, | ||
): number; | ||
@@ -294,3 +294,3 @@ | ||
values: Iterable<T>, | ||
accessor: (datum: T, index: number, array: Iterable<T>) => number | undefined | null | ||
accessor: (datum: T, index: number, array: Iterable<T>) => number | undefined | null, | ||
): Float64Array; | ||
@@ -440,3 +440,9 @@ | ||
*/ | ||
export function quickselect<T>(array: ArrayLike<T>, k: number, left: number, right: number, compare: (a: Primitive | undefined, b: Primitive | undefined) => number): T[]; | ||
export function quickselect<T>( | ||
array: ArrayLike<T>, | ||
k: number, | ||
left: number, | ||
right: number, | ||
compare: (a: Primitive | undefined, b: Primitive | undefined) => number, | ||
): T[]; | ||
@@ -465,3 +471,6 @@ // NB. this is limited to primitive values due to D3's use of the <, >, and >= operators. Results get weird for object instances. | ||
*/ | ||
export function group<TObject, TKey>(iterable: Iterable<TObject>, key: (value: TObject) => TKey): InternMap<TKey, TObject[]>; | ||
export function group<TObject, TKey>( | ||
iterable: Iterable<TObject>, | ||
key: (value: TObject) => TKey, | ||
): InternMap<TKey, TObject[]>; | ||
/** | ||
@@ -477,3 +486,3 @@ * Groups the specified array of values into an InternMap from key to array of value. | ||
key1: (value: TObject) => TKey1, | ||
key2: (value: TObject) => TKey2 | ||
key2: (value: TObject) => TKey2, | ||
): InternMap<TKey1, InternMap<TKey2, TObject[]>>; | ||
@@ -492,3 +501,3 @@ /** | ||
key2: (value: TObject) => TKey2, | ||
key3: (value: TObject) => TKey3 | ||
key3: (value: TObject) => TKey3, | ||
): InternMap<TKey1, InternMap<TKey2, InternMap<TKey3, TObject[]>>>; | ||
@@ -504,3 +513,3 @@ | ||
iterable: Iterable<TObject>, | ||
key: (value: TObject) => TKey | ||
key: (value: TObject) => TKey, | ||
): Array<[TKey, TObject[]]>; | ||
@@ -517,3 +526,3 @@ /** | ||
key1: (value: TObject) => TKey1, | ||
key2: (value: TObject) => TKey2 | ||
key2: (value: TObject) => TKey2, | ||
): Array<[TKey1, Array<[TKey2, TObject[]]>]>; | ||
@@ -532,3 +541,3 @@ /** | ||
key2: (value: TObject) => TKey2, | ||
key3: (value: TObject) => TKey3 | ||
key3: (value: TObject) => TKey3, | ||
): Array<[TKey1, Array<[TKey2, Array<[TKey3, TObject[]]>]>]>; | ||
@@ -542,3 +551,6 @@ | ||
*/ | ||
export function index<TObject, TKey>(iterable: Iterable<TObject>, key: (value: TObject) => TKey): InternMap<TKey, TObject>; | ||
export function index<TObject, TKey>( | ||
iterable: Iterable<TObject>, | ||
key: (value: TObject) => TKey, | ||
): InternMap<TKey, TObject>; | ||
/** | ||
@@ -554,3 +566,3 @@ * Equivalent to group but returns a unique value per compound key instead of an array, throwing if the key is not unique. | ||
key1: (value: TObject) => TKey1, | ||
key2: (value: TObject) => TKey2 | ||
key2: (value: TObject) => TKey2, | ||
): InternMap<TKey1, InternMap<TKey2, TObject>>; | ||
@@ -569,3 +581,3 @@ /** | ||
key2: (value: TObject) => TKey2, | ||
key3: (value: TObject) => TKey3 | ||
key3: (value: TObject) => TKey3, | ||
): InternMap<TKey1, InternMap<TKey2, InternMap<TKey3, TObject>>>; | ||
@@ -581,3 +593,3 @@ | ||
iterable: Iterable<TObject>, | ||
key: (value: TObject) => TKey | ||
key: (value: TObject) => TKey, | ||
): Array<[TKey, TObject]>; | ||
@@ -594,3 +606,3 @@ /** | ||
key1: (value: TObject) => TKey1, | ||
key2: (value: TObject) => TKey2 | ||
key2: (value: TObject) => TKey2, | ||
): Array<[TKey1, Array<[TKey2, TObject]>]>; | ||
@@ -609,3 +621,3 @@ /** | ||
key2: (value: TObject) => TKey2, | ||
key3: (value: TObject) => TKey3 | ||
key3: (value: TObject) => TKey3, | ||
): Array<[TKey1, Array<[TKey2, Array<[TKey3, TObject]>]>]>; | ||
@@ -623,3 +635,3 @@ | ||
reduce: (value: TObject[]) => TReduce, | ||
key: (value: TObject) => TKey | ||
key: (value: TObject) => TKey, | ||
): InternMap<TKey, TReduce>; | ||
@@ -638,3 +650,3 @@ /** | ||
key1: (value: TObject) => TKey1, | ||
key2: (value: TObject) => TKey2 | ||
key2: (value: TObject) => TKey2, | ||
): InternMap<TKey1, InternMap<TKey2, TReduce>>; | ||
@@ -655,3 +667,3 @@ /** | ||
key2: (value: TObject) => TKey2, | ||
key3: (value: TObject) => TKey3 | ||
key3: (value: TObject) => TKey3, | ||
): InternMap<TKey1, InternMap<TKey2, InternMap<TKey3, TReduce>>>; | ||
@@ -669,3 +681,3 @@ | ||
reduce: (value: TObject[]) => TReduce, | ||
key: (value: TObject) => TKey | ||
key: (value: TObject) => TKey, | ||
): Array<[TKey, TReduce]>; | ||
@@ -684,3 +696,3 @@ /** | ||
key1: (value: TObject) => TKey1, | ||
key2: (value: TObject) => TKey2 | ||
key2: (value: TObject) => TKey2, | ||
): Array<[TKey1, Array<[TKey2, TReduce]>]>; | ||
@@ -701,3 +713,3 @@ /** | ||
key2: (value: TObject) => TKey2, | ||
key3: (value: TObject) => TKey3 | ||
key3: (value: TObject) => TKey3, | ||
): Array<[TKey1, Array<[TKey2, Array<[TKey3, TReduce]>]>]>; | ||
@@ -712,3 +724,3 @@ | ||
comparator: (a: TObject[], b: TObject[]) => number, | ||
key: (value: TObject) => TKey | ||
key: (value: TObject) => TKey, | ||
): TKey[]; | ||
@@ -721,3 +733,3 @@ /** | ||
accessor: (value: TObject[]) => TReduce, | ||
key: (value: TObject) => TKey | ||
key: (value: TObject) => TKey, | ||
): TKey[]; | ||
@@ -739,3 +751,3 @@ | ||
iterable: Iterable<TObject>, | ||
accessor: (a: TObject, b: TObject) => number | null | undefined | ||
accessor: (a: TObject, b: TObject) => number | null | undefined, | ||
): number; | ||
@@ -793,3 +805,3 @@ | ||
*/ | ||
export function permute<T>(source: { [key: number]: T; }, keys: Iterable<number>): T[]; | ||
export function permute<T>(source: { [key: number]: T }, keys: Iterable<number>): T[]; | ||
/** | ||
@@ -905,3 +917,3 @@ * Extract the values from an object into an array with a stable order. For example: | ||
iterable: Iterable<T>, | ||
test: (value: T, index: number, iterable: Iterable<T>) => unknown | ||
test: (value: T, index: number, iterable: Iterable<T>) => unknown, | ||
): boolean; | ||
@@ -916,3 +928,3 @@ | ||
iterable: Iterable<T>, | ||
test: (value: T, index: number, iterable: Iterable<T>) => unknown | ||
test: (value: T, index: number, iterable: Iterable<T>) => unknown, | ||
): boolean; | ||
@@ -926,3 +938,3 @@ | ||
iterable: Iterable<T>, | ||
test: (value: T, index: number, iterable: Iterable<T>) => unknown | ||
test: (value: T, index: number, iterable: Iterable<T>) => unknown, | ||
): T[]; | ||
@@ -943,3 +955,3 @@ | ||
reducer: (previousValue: T, currentValue: T, currentIndex: number, iterable: Iterable<T>) => T, | ||
initialValue?: T | ||
initialValue?: T, | ||
): T; | ||
@@ -953,3 +965,3 @@ /** | ||
reducer: (previousValue: U, currentValue: T, currentIndex: number, iterable: Iterable<T>) => U, | ||
initialValue: U | ||
initialValue: U, | ||
): U; | ||
@@ -1025,4 +1037,7 @@ | ||
*/ | ||
export type ThresholdCountGenerator<Value extends number | undefined = number | undefined> = | ||
(values: ArrayLike<Value>, min: number, max: number) => number; | ||
export type ThresholdCountGenerator<Value extends number | undefined = number | undefined> = ( | ||
values: ArrayLike<Value>, | ||
min: number, | ||
max: number, | ||
) => number; | ||
@@ -1032,4 +1047,7 @@ /** | ||
*/ | ||
export type ThresholdNumberArrayGenerator<Value extends number | undefined> = | ||
(values: ArrayLike<Value>, min: number, max: number) => Value[]; | ||
export type ThresholdNumberArrayGenerator<Value extends number | undefined> = ( | ||
values: ArrayLike<Value>, | ||
min: number, | ||
max: number, | ||
) => Value[]; | ||
@@ -1039,4 +1057,7 @@ /** | ||
*/ | ||
export type ThresholdDateArrayGenerator<Value extends Date | undefined> = | ||
(values: ArrayLike<Value>, min: Date, max: Date) => Value[]; | ||
export type ThresholdDateArrayGenerator<Value extends Date | undefined> = ( | ||
values: ArrayLike<Value>, | ||
min: Date, | ||
max: Date, | ||
) => Value[]; | ||
@@ -1080,3 +1101,5 @@ export interface HistogramCommon<Datum, Value extends number | Date | undefined> { | ||
export interface HistogramGeneratorNumber<Datum, Value extends number | undefined> extends HistogramCommon<Datum, Value> { | ||
export interface HistogramGeneratorNumber<Datum, Value extends number | undefined> | ||
extends HistogramCommon<Datum, Value> | ||
{ | ||
domain(): (values: Iterable<Value>) => [number, number] | [undefined, undefined]; | ||
@@ -1083,0 +1106,0 @@ domain(domain: [number, number]): this; |
{ | ||
"name": "@types/d3-array", | ||
"version": "2.12.4", | ||
"version": "2.12.5", | ||
"description": "TypeScript definitions for D3JS d3-array module", | ||
@@ -48,4 +48,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-array", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "9128e843fc6c1e18932e6fbb3020c090aaae12abec1da5232b4fe1a95ff16139", | ||
"typeScriptVersion": "4.3" | ||
"typesPublisherContentHash": "75c77cee8273e31c7da2eff50237762a5b471d05fd50c50cd7b08f640e736249", | ||
"typeScriptVersion": "4.5" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Thu, 25 May 2023 20:34:08 GMT | ||
* Last updated: Fri, 22 Sep 2023 20:29:40 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: none |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52707
1051