@types/d3-array
Advanced tools
Comparing version 2.7.0 to 2.8.0
@@ -1,2 +0,2 @@ | ||
// Type definitions for D3JS d3-array module 2.7 | ||
// Type definitions for D3JS d3-array module 2.8 | ||
// Project: https://github.com/d3/d3-array, https://d3js.org/d3-array | ||
@@ -12,3 +12,3 @@ // Definitions by: Alex Ford <https://github.com/gustavderdrache> | ||
// Last module patch version validated against: 2.7.1 | ||
// Last module patch version validated against: 2.8.0 | ||
@@ -32,3 +32,3 @@ // -------------------------------------------------------------------------- | ||
// -------------------------------------------------------------------------------------- | ||
// Descriptive Statistics | ||
// Statistics | ||
// -------------------------------------------------------------------------------------- | ||
@@ -287,3 +287,3 @@ | ||
// -------------------------------------------------------------------------------------- | ||
// Searching Arrays | ||
// Search | ||
// -------------------------------------------------------------------------------------- | ||
@@ -426,3 +426,3 @@ | ||
// -------------------------------------------------------------------------------------- | ||
// Transforming Arrays | ||
// Transformations | ||
// -------------------------------------------------------------------------------------- | ||
@@ -769,3 +769,3 @@ | ||
* | ||
* Like d3.tickStep, except requires that start is always less than or equal to step, and if the tick step for the given start, | ||
* Like d3.tickStep, except requires that start is always less than or equal to stop, and if the tick step for the given start, | ||
* stop and count would be less than one, returns the negative inverse tick step instead. | ||
@@ -796,2 +796,12 @@ * | ||
/** | ||
* Returns a new interval [niceStart, niceStop] covering the given interval [start, stop] and where niceStart and niceStop are guaranteed to align with the corresponding tick step. | ||
* Like d3.tickIncrement, this requires that start is less than or equal to stop. | ||
* | ||
* @param start Start value for ticks | ||
* @param stop Stop value for ticks | ||
* @param count count + 1 is the approximate number of ticks to be returned by d3.ticks. | ||
*/ | ||
export function nice(start: number, stop: number, count: number): [number, number]; | ||
/** | ||
* Generates a 0-based numeric sequence. The output range does not include 'stop'. | ||
@@ -818,5 +828,112 @@ */ | ||
// -------------------------------------------------------------------------------------- | ||
// Histogram | ||
// Iterables | ||
// -------------------------------------------------------------------------------------- | ||
/** | ||
* Returns true if the given test function returns true for every value in the given iterable. | ||
* This method returns as soon as test returns a non-truthy value or all values are iterated over. | ||
* Equivalent to array.every. | ||
*/ | ||
export function every<T>( | ||
iterable: Iterable<T>, | ||
test: (value: T, index: number, iterable: Iterable<T>) => unknown | ||
): boolean; | ||
/** | ||
* Returns true if the given test function returns true for any value in the given iterable. | ||
* This method returns as soon as test returns a truthy value or all values are iterated over. | ||
* Equivalent to array.some. | ||
*/ | ||
export function some<T>( | ||
iterable: Iterable<T>, | ||
test: (value: T, index: number, iterable: Iterable<T>) => unknown | ||
): boolean; | ||
/** | ||
* Returns a new array containing the values from iterable, in order, for which the given test function returns true. | ||
* Equivalent to array.filter. | ||
*/ | ||
export function filter<T>( | ||
iterable: Iterable<T>, | ||
test: (value: T, index: number, iterable: Iterable<T>) => unknown | ||
): T[]; | ||
/** | ||
* Returns a new array containing the mapped values from iterable, in order, as defined by given mapper function. | ||
* Equivalent to array.map and Array.from. | ||
*/ | ||
export function map<T, U>(iterable: Iterable<T>, mapper: (value: T, index: number, iterable: Iterable<T>) => U): U[]; | ||
/** | ||
* Returns the reduced value defined by given reducer function, which is repeatedly invoked for each value in iterable, being passed the current reduced value and the next value. | ||
* Equivalent to array.reduce. | ||
*/ | ||
export function reduce<T>( | ||
iterable: Iterable<T>, | ||
reducer: (previousValue: T, currentValue: T, currentIndex: number, iterable: Iterable<T>) => T, | ||
initialValue?: T | ||
): T; | ||
/** | ||
* Returns the reduced value defined by given reducer function, which is repeatedly invoked for each value in iterable, being passed the current reduced value and the next value. | ||
* Equivalent to array.reduce. | ||
*/ | ||
export function reduce<T, U>( | ||
iterable: Iterable<T>, | ||
reducer: (previousValue: U, currentValue: T, currentIndex: number, iterable: Iterable<T>) => U, | ||
initialValue: U | ||
): U; | ||
/** | ||
* Returns an array containing the values in the given iterable in reverse order. | ||
* Equivalent to array.reverse, except that it does not mutate the given iterable. | ||
*/ | ||
export function reverse<T>(iterable: Iterable<T>): T[]; | ||
/** | ||
* Returns an array containing the values in the given iterable in the sorted order defined by the given comparator function. | ||
* If comparator is not specified, it defaults to d3.ascending. | ||
* Equivalent to array.sort, except that it does not mutate the given iterable, and the comparator defaults to natural order instead of lexicographic order. | ||
*/ | ||
export function sort<T>(iterable: Iterable<T>, comparator?: (a: T, b: T) => number): T[]; | ||
// -------------------------------------------------------------------------------------- | ||
// Sets | ||
// -------------------------------------------------------------------------------------- | ||
/** | ||
* Returns a new Set containing every value in iterable that is not in any of the others iterables. | ||
*/ | ||
export function difference<T>(iterable: Iterable<T>, ...others: Array<Iterable<T>>): Set<T>; | ||
/** | ||
* Returns a new Set containing every (distinct) value that appears in any of the given iterables. | ||
* The order of values in the returned Set is based on their first occurrence in the given iterables. | ||
*/ | ||
export function union<T>(...iterables: Array<Iterable<T>>): Set<T>; | ||
/** | ||
* Returns a new Set containing every (distinct) value that appears in all of the given iterables. | ||
* The order of values in the returned Set is based on their first occurrence in the given iterables. | ||
*/ | ||
export function intersection<T>(...iterables: Array<Iterable<T>>): Set<T>; | ||
/** | ||
* Returns true if a is a superset of b: if every value in the given iterable b is also in the given iterable a. | ||
*/ | ||
export function superset<T>(a: Iterable<T>, b: Iterable<T>): boolean; | ||
/** | ||
* Returns true if a is a subset of b: if every value in the given iterable a is also in the given iterable b. | ||
*/ | ||
export function subset<T>(a: Iterable<T>, b: Iterable<T>): boolean; | ||
/** | ||
* Returns true if a and b are disjoint: if a and b contain no shared value. | ||
*/ | ||
export function disjoint<T>(a: Iterable<T>, b: Iterable<T>): boolean; | ||
// -------------------------------------------------------------------------------------- | ||
// Bins | ||
// -------------------------------------------------------------------------------------- | ||
export interface Bin<Datum, Value extends number | Date | undefined> extends Array<Datum> { | ||
@@ -823,0 +940,0 @@ x0: Value | undefined; |
{ | ||
"name": "@types/d3-array", | ||
"version": "2.7.0", | ||
"version": "2.8.0", | ||
"description": "TypeScript definitions for D3JS d3-array module", | ||
@@ -47,4 +47,4 @@ "license": "MIT", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "e06c2a6c00d4ef46af03f8895ce8844061bc6362adf82c14c1fb6efc60354487", | ||
"typesPublisherContentHash": "e11cae8e6fa0982784fc5aa3002d51e58830d005c6d0f378884a129605786adc", | ||
"typeScriptVersion": "3.2" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Mon, 09 Nov 2020 17:27:44 GMT | ||
* Last updated: Mon, 16 Nov 2020 17:32:24 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
49723
979