@types/d3-array
Advanced tools
Comparing version 3.0.7 to 3.0.8
@@ -70,3 +70,3 @@ // Type definitions for D3JS d3-array module 3.0 | ||
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; | ||
@@ -78,3 +78,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; | ||
@@ -91,3 +91,3 @@ | ||
iterable: Iterable<TDatum>, | ||
accessor: (datum: TDatum, index: number, array: Iterable<TDatum>) => unknown | ||
accessor: (datum: TDatum, index: number, array: Iterable<TDatum>) => unknown, | ||
): number; | ||
@@ -112,3 +112,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; | ||
@@ -120,3 +120,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; | ||
@@ -133,3 +133,3 @@ | ||
iterable: Iterable<TDatum>, | ||
accessor: (datum: TDatum, index: number, array: Iterable<TDatum>) => unknown | ||
accessor: (datum: TDatum, index: number, array: Iterable<TDatum>) => unknown, | ||
): number; | ||
@@ -150,3 +150,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]; | ||
@@ -158,3 +158,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]; | ||
@@ -177,3 +177,6 @@ | ||
*/ | ||
export function mode<T>(iterable: Iterable<T>, accessor: (datum: T, index: number, array: Iterable<T>) => number | undefined | null): number; | ||
export function mode<T>( | ||
iterable: Iterable<T>, | ||
accessor: (datum: T, index: number, array: Iterable<T>) => number | undefined | null, | ||
): number; | ||
@@ -189,3 +192,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; | ||
@@ -202,3 +205,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; | ||
@@ -215,3 +218,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; | ||
@@ -234,3 +237,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; | ||
@@ -252,3 +255,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; | ||
@@ -262,3 +265,3 @@ | ||
array: Array<Numeric | undefined | null>, | ||
p: number | ||
p: number, | ||
): number | undefined; | ||
@@ -272,3 +275,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; | ||
@@ -293,3 +296,5 @@ | ||
iterable: Iterable<T>, | ||
accessorOrComparator: ((datum: T, index: number, array: Iterable<T>) => number | undefined | null) | ((a: T, b: T) => number | undefined | null) | ||
accessorOrComparator: | ||
| ((datum: T, index: number, array: Iterable<T>) => number | undefined | null) | ||
| ((a: T, b: T) => number | undefined | null), | ||
): Float64Array; | ||
@@ -312,3 +317,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; | ||
@@ -326,3 +331,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; | ||
@@ -341,3 +346,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; | ||
@@ -356,3 +361,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; | ||
@@ -472,3 +477,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[]; | ||
@@ -608,3 +619,3 @@ // NB. this is limited to primitive values due to D3's use of the <, >, and >= operators. Results get weird for object instances. | ||
comparator: (a: TObject[], b: TObject[]) => number, | ||
key: (value: TObject) => TKey | ||
key: (value: TObject) => TKey, | ||
): TKey[]; | ||
@@ -618,3 +629,3 @@ /** | ||
accessor: (value: TObject[]) => unknown, | ||
key: (value: TObject) => TKey | ||
key: (value: TObject) => TKey, | ||
): TKey[]; | ||
@@ -636,3 +647,3 @@ | ||
iterable: Iterable<TObject>, | ||
accessor: (a: TObject, b: TObject) => number | null | undefined | ||
accessor: (a: TObject, b: TObject) => number | null | undefined, | ||
): number; | ||
@@ -690,3 +701,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[]; | ||
/** | ||
@@ -803,3 +814,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; | ||
@@ -814,3 +825,3 @@ | ||
iterable: Iterable<T>, | ||
test: (value: T, index: number, iterable: Iterable<T>) => unknown | ||
test: (value: T, index: number, iterable: Iterable<T>) => unknown, | ||
): boolean; | ||
@@ -824,3 +835,3 @@ | ||
iterable: Iterable<T>, | ||
test: (value: T, index: number, iterable: Iterable<T>) => unknown | ||
test: (value: T, index: number, iterable: Iterable<T>) => unknown, | ||
): T[]; | ||
@@ -841,3 +852,3 @@ | ||
reducer: (previousValue: T, currentValue: T, currentIndex: number, iterable: Iterable<T>) => T, | ||
initialValue?: T | ||
initialValue?: T, | ||
): T; | ||
@@ -851,3 +862,3 @@ /** | ||
reducer: (previousValue: U, currentValue: T, currentIndex: number, iterable: Iterable<T>) => U, | ||
initialValue: U | ||
initialValue: U, | ||
): U; | ||
@@ -923,4 +934,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; | ||
@@ -930,4 +944,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[]; | ||
@@ -937,4 +954,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[]; | ||
@@ -968,3 +988,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]; | ||
@@ -971,0 +993,0 @@ domain(domain: [number, number] | ((values: Iterable<Value>) => [number, number] | [undefined, undefined])): this; |
{ | ||
"name": "@types/d3-array", | ||
"version": "3.0.7", | ||
"version": "3.0.8", | ||
"description": "TypeScript definitions for D3JS d3-array module", | ||
@@ -53,4 +53,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-array", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "0f5cadfe1257c06fe63e7b4f5ea59cb53f91401bea9fc7ef48b006c19de5c4fc", | ||
"typeScriptVersion": "4.3" | ||
"typesPublisherContentHash": "74ce508aa834d3872c81009d7721ddcb58e71b2a7248dd42bb3525e76f2ec99f", | ||
"typeScriptVersion": "4.5" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Mon, 28 Aug 2023 19:03:02 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
49726
932