Merge pull request #9852 from leon/master

D3 - extent does not work with dates
This commit is contained in:
Mohamed Hegazy
2016-06-28 00:45:23 -07:00
committed by GitHub

7
d3/d3.d.ts vendored
View File

@@ -1078,11 +1078,16 @@ declare namespace d3 {
* Return the min and max simultaneously.
*/
export function extent<T>(array: T[], accessor: (datum: T, index: number) => string): [string, string];
/**
* Return the min and max simultaneously.
*/
export function extent<T>(array: T[], accessor: (datum: T, index: number) => Date): [Date, Date];
/**
* Return the min and max simultaneously.
*/
export function extent<T, U extends Numeric>(array: U[], accessor: (datum: T, index: number) => U): [U | Primitive, U | Primitive];
export function extent<T, U extends Numeric>(array: T[], accessor: (datum: T, index: number) => U): [U | Primitive, U | Primitive];
/**
* Compute the sum of an array of numbers.