Skip to content

Commit

Permalink
chore: adapt to typescript@3
Browse files Browse the repository at this point in the history
  • Loading branch information
idiotWu committed Aug 17, 2018
1 parent 1080823 commit 2d71bc4
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/events/wheel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const DELTA_MODE = [1.0, 28.0, 500.0];

const getDeltaMode = (mode) => DELTA_MODE[mode] || DELTA_MODE[0];

function normalizeDelta(evt: WheelEvent) {
function normalizeDelta(evt: any) {
if ('deltaX' in evt) {
const mode = getDeltaMode(evt.deltaMode);

Expand Down
2 changes: 1 addition & 1 deletion src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const globalPlugins: PluginMap = {
};

export function addPlugins(
...Plugins: (typeof ScrollbarPlugin)[],
...Plugins: (typeof ScrollbarPlugin)[]
): void {
Plugins.forEach((P) => {
const { pluginName } = P;
Expand Down
2 changes: 1 addition & 1 deletion src/scrolling/scroll-to.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function scrollTo(
x: number,
y: number,
duration = 0,
{ easing = defaultEasing, callback = null }: Partial<I.ScrollToOptions> = {},
{ easing = defaultEasing, callback }: Partial<I.ScrollToOptions> = {},
) {
const {
options,
Expand Down
2 changes: 0 additions & 2 deletions src/utils/touch-record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export class Tracker {
}

export class TouchRecord {
private _lastTouch: Tracker;
private _activeTouchID: number;
private _touchList: { [id: number]: Tracker } = {};

Expand Down Expand Up @@ -135,7 +134,6 @@ export class TouchRecord {

private _setActiveID(touches: TouchList) {
this._activeTouchID = touches[touches.length - 1].identifier;
this._lastTouch = this._touchList[this._activeTouchID];
}

private _getActiveTracker(): Tracker {
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
},
"exclude": [
"node_modules",
"build",
"dist"
]
}
2 changes: 1 addition & 1 deletion tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"ter-indent": [true, 2, { "SwitchCase": 1 }],
"semicolon": [true, "always"],
"align": [true, "parameters", "statements"],
"trailing-comma": [true, {"multiline": "always", "singleline": "never"}],
"trailing-comma": [true, {"multiline": "always", "singleline": "never", "esSpecCompliant": true}],
"no-empty": false,
"no-unused-variable": false,
"strict-type-predicates": false,
Expand Down

0 comments on commit 2d71bc4

Please sign in to comment.