Commit 2149d442 authored by 李勇諭's avatar 李勇諭

fix type

parent 7abf2bfe
......@@ -2,9 +2,6 @@
/node_modules
/public
/src
/dist/index.d.ts
/dist/index.js
/dist/index.js.map
tsconfig.json
tslint.json
webpack.config.js
......
{
"name": "react-js-pull-to-refresh",
"version": "0.1.0",
"version": "0.1.2",
"description": "React pull to refresh",
"main": "dist/PullToRefresh.js",
"types": ".dist/PullToRefresh.d.ts",
"main": "dist/index.js",
"types": ".dist/index.d.ts",
"scripts": {
"dev": "webpack-dev-server",
"lint": "tslint -c tslint.json src/*",
......
......@@ -63,7 +63,7 @@ export class PullToRefresh extends React.Component<PullToRefreshProps, PullToRef
}
@autobind
private onTouchStart(e: TouchEvent) {
private onTouchStart(e) {
this.dragging = true;
this.startY = e["pageY"] || e.touches[0].pageY;
this.currentY = this.startY;
......@@ -73,7 +73,7 @@ export class PullToRefresh extends React.Component<PullToRefreshProps, PullToRef
}
@autobind
private onTouchMove(e: TouchEvent) {
private onTouchMove(e) {
if (!this.dragging) {
return;
}
......
import {PullToRefresh} from "./PullToRefresh";
export {PullToRefresh};
......@@ -13,7 +13,7 @@ module.exports = {
"react-hot-loader/patch", // activate HMR for React
"webpack-dev-server/client?http://localhost:8080/",
"webpack/hot/only-dev-server",
"./src/index.tsx"
"./src/dev.tsx"
],
output: {
filename: "bundle.js",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment