Split geometric types to their own definition file (#8202)

* Split geometric types to their own definition file
* Re-export types
This commit is contained in:
Evert Timberg 2020-12-19 13:39:35 -05:00 committed by GitHub
parent 1110d4dd19
commit 75fcd4fffa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 14 deletions

11
types/geometric.d.ts vendored Normal file
View File

@ -0,0 +1,11 @@
export interface ChartArea {
top: number;
left: number;
right: number;
bottom: number;
}
export interface Point {
x: number;
y: number;
}

View File

@ -1,4 +1,5 @@
import { ChartArea, PointStyle } from '../index.esm';
import { PointStyle } from '../index.esm';
import { ChartArea } from '../geometric';
/**
* Clears the entire canvas associated to the given `chart`.

16
types/index.esm.d.ts vendored
View File

@ -12,6 +12,9 @@
* }
*/
import { ChartArea, Point } from './geometric';
export { ChartArea, Point } from './geometric';
export interface ParsingOptions {
/**
* How to parse the dataset. The parsing can be disabled by specifying parsing: false at chart options or dataset. If parsing is disabled, data must be sorted and in the formats the associated chart type and scales use internally.
@ -1452,12 +1455,6 @@ export interface ChartEvent {
x: number | null;
y: number | null;
}
export interface Point {
x: number;
y: number;
}
export interface ChartComponent {
id: string;
defaults?: any;
@ -1471,13 +1468,6 @@ export interface ChartComponent {
export type TimeUnit = 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
export interface ChartArea {
top: number;
left: number;
right: number;
bottom: number;
}
export interface ScriptableContext {
chart: Chart;
dataPoint: any;