mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
heatmap.js: Remove Point type
Inline type that is used in only one place.
This commit is contained in:
parent
f07f6a8da9
commit
3a88a0abc4
11
types/heatmap.js/index.d.ts
vendored
11
types/heatmap.js/index.d.ts
vendored
@ -159,7 +159,7 @@ export class Heatmap<V extends string, X extends string, Y extends string> {
|
||||
* // get the value at x=10, y=10
|
||||
* heatmapInstance.getValueAt({ x: 10, y: 10 }); // returns 100
|
||||
*/
|
||||
getValueAt(point: Point<'x', 'y'>): number;
|
||||
getValueAt(point: { x: number, y: number }): number;
|
||||
|
||||
/**
|
||||
* Returns a persistable and reimportable (with setData) JSON object.
|
||||
@ -305,12 +305,6 @@ export interface HeatmapOverlayConfiguration<
|
||||
lngField?: TLong;
|
||||
}
|
||||
|
||||
/**
|
||||
* A position in the heatmap.
|
||||
*/
|
||||
export type Point<X extends string, Y extends string> =
|
||||
Record<X | Y, number>;
|
||||
|
||||
/**
|
||||
* A single data point on a heatmap. The interface of the data point can be
|
||||
* overridden by providing alternative values for `xKey` and `yKey` in the
|
||||
@ -320,8 +314,7 @@ export type DataPoint<
|
||||
V extends string = 'value',
|
||||
X extends string = 'x',
|
||||
Y extends string = 'y',
|
||||
> =
|
||||
Record<V, number> & Point<X, Y>;
|
||||
> = Record<V | X | Y, number>;
|
||||
|
||||
/**
|
||||
* Type of data returned by `Heatmap#hello`, which ignores custom `xField`,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user