Skip to content

Commit ef3130f

Browse files
authored
Fix strict mode errors from typings (#563)
* Fix strict mode errors from typings * Remove comments
1 parent dbfd1db commit ef3130f

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ export function pan(chart: Chart, amount: PanAmount, scales?: Scale[], mode?: Up
4747
export function zoom(chart: Chart, amount: ZoomAmount, mode?: UpdateMode): void;
4848
export function zoomScale(chart: Chart, scaleId: string, range: ScaleRange, mode?: UpdateMode): void;
4949
export function resetZoom(chart: Chart, mode?: UpdateMode): void;
50-
export function getZoomLevel(chart): number;
50+
export function getZoomLevel(chart: Chart): number;

types/options.d.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,7 @@ export interface ScaleLimits {
169169
}
170170

171171
export interface LimitOptions {
172-
// Default horizontal and vertical scale limits
173-
x?: ScaleLimits;
174-
y?: ScaleLimits;
175-
// Optional additional scale limits, indexed by the scale's ID (key)
172+
// Scale limits, indexed by the scale's ID (key) or by axis (x/y)
176173
[axisId: string]: ScaleLimits;
177174
}
178175

types/tests/exports.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ const chart = new Chart('id', {
2525
min: 1,
2626
max: 2,
2727
minRange: 1
28+
},
29+
y2: {
30+
min: 10,
31+
max: 20,
32+
minRange: 5
2833
}
2934
},
3035
pan: {

types/tests/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"target": "ES6",
44
"moduleResolution": "Node",
55
"alwaysStrict": true,
6+
"strict": true,
67
"noEmit": true
78
},
89
"include": [

0 commit comments

Comments
 (0)