Skip to content

Commit

Permalink
Fix strict mode errors from typings (#563)
Browse files Browse the repository at this point in the history
* Fix strict mode errors from typings

* Remove comments
  • Loading branch information
kurkle authored Jul 1, 2021
1 parent dbfd1db commit ef3130f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ export function pan(chart: Chart, amount: PanAmount, scales?: Scale[], mode?: Up
export function zoom(chart: Chart, amount: ZoomAmount, mode?: UpdateMode): void;
export function zoomScale(chart: Chart, scaleId: string, range: ScaleRange, mode?: UpdateMode): void;
export function resetZoom(chart: Chart, mode?: UpdateMode): void;
export function getZoomLevel(chart): number;
export function getZoomLevel(chart: Chart): number;
5 changes: 1 addition & 4 deletions types/options.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,7 @@ export interface ScaleLimits {
}

export interface LimitOptions {
// Default horizontal and vertical scale limits
x?: ScaleLimits;
y?: ScaleLimits;
// Optional additional scale limits, indexed by the scale's ID (key)
// Scale limits, indexed by the scale's ID (key) or by axis (x/y)
[axisId: string]: ScaleLimits;
}

Expand Down
5 changes: 5 additions & 0 deletions types/tests/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ const chart = new Chart('id', {
min: 1,
max: 2,
minRange: 1
},
y2: {
min: 10,
max: 20,
minRange: 5
}
},
pan: {
Expand Down
1 change: 1 addition & 0 deletions types/tests/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"target": "ES6",
"moduleResolution": "Node",
"alwaysStrict": true,
"strict": true,
"noEmit": true
},
"include": [
Expand Down

0 comments on commit ef3130f

Please sign in to comment.