diff --git a/notNeededPackages.json b/notNeededPackages.json index 6751853b53..cb2dcda3e4 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -3906,6 +3906,12 @@ "sourceRepoURL": "https://github.com/tanem/react-svg", "asOfVersion": "5.0.0" }, + { + "libraryName": "react-swipeable", + "typingsPackageName": "react-swipeable", + "sourceRepoURL": "https://github.com/dogfessional/react-swipeable", + "asOfVersion": "5.2.0" + }, { "libraryName": "react-toastify", "typingsPackageName": "react-toastify", diff --git a/types/react-swipeable/index.d.ts b/types/react-swipeable/index.d.ts deleted file mode 100644 index 7a53884bd3..0000000000 --- a/types/react-swipeable/index.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Type definitions for react-swipeable 4.3 -// Project: https://github.com/dogfessional/react-swipeable -// Definitions by: Giedrius Grabauskas -// Konstantin Vasilev -// Hiroki Horiuchi -// Adam Bowles -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 - -import * as React from 'react'; - -declare class ReactSwipeable extends React.Component> {} - -declare namespace ReactSwipeable { - type OnSwipingCallback = (event: React.TouchEvent, deltaX: number, deltaY: number, absX: number, absY: number, velocity: number) => void; - type OnSwipedCallback = (event: React.TouchEvent, deltaX: number, deltaY: number, isFlick: boolean, velocity: number) => void; - type OnSwipedDirectionCallback = (event: React.TouchEvent, delta: number, isFlick: boolean) => void; - type OnSwipingDirectionCallback = (event: React.TouchEvent, delta: number) => void; - type OnTapCallback = (event: React.TouchEvent) => void; - - interface SwipeableProps extends React.ClassAttributes>, React.HTMLAttributes { - onSwiped?: OnSwipedCallback; - onSwiping?: OnSwipingCallback; - onSwipingUp?: OnSwipingDirectionCallback; - onSwipingRight?: OnSwipingDirectionCallback; - onSwipingDown?: OnSwipingDirectionCallback; - onSwipingLeft?: OnSwipingDirectionCallback; - onSwipedUp?: OnSwipedDirectionCallback; - onSwipedRight?: OnSwipedDirectionCallback; - onSwipedDown?: OnSwipedDirectionCallback; - onSwipedLeft?: OnSwipedDirectionCallback; - onTap?: OnTapCallback; - flickThreshold?: number; - delta?: number; - preventDefaultTouchmoveEvent?: boolean; - stopPropagation?: boolean; - nodeName?: string; - trackMouse?: boolean; - disabled?: boolean; - rotationAngle?: number; - innerRef?: React.Ref; - children?: React.ReactNode; - } -} - -export = ReactSwipeable; diff --git a/types/react-swipeable/react-swipeable-tests.tsx b/types/react-swipeable/react-swipeable-tests.tsx deleted file mode 100644 index 0479a7d3d5..0000000000 --- a/types/react-swipeable/react-swipeable-tests.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import * as React from 'react'; -import Swipeable = require('react-swipeable'); - -class SampleComponent extends React.PureComponent { - private readonly handleSwiped: Swipeable.OnSwipedCallback = () => {}; - private readonly handleSwiping: Swipeable.OnSwipingCallback = () => {}; - private readonly handleSwipingUp: Swipeable.OnSwipingDirectionCallback = () => {}; - private readonly handleSwipingRight: Swipeable.OnSwipingDirectionCallback = () => {}; - private readonly handleSwipingDown: Swipeable.OnSwipingDirectionCallback = () => {}; - private readonly handleSwipingLeft: Swipeable.OnSwipingDirectionCallback = () => {}; - private readonly handleSwipedUp: Swipeable.OnSwipedDirectionCallback = () => {}; - private readonly handleSwipedRight: Swipeable.OnSwipedDirectionCallback = () => {}; - private readonly handleSwipedDown: Swipeable.OnSwipedDirectionCallback = () => {}; - private readonly handleSwipedLeft: Swipeable.OnSwipedDirectionCallback = () => {}; - private readonly handleTap: Swipeable.OnTapCallback = () => {}; - private readonly handleClick = () => {}; - private readonly swipeRef = React.createRef(); - - render() { - return ( - -
- This element can be swiped -
-
- ); - } -} - -class DivSwipeable extends Swipeable {} -const TestComponent: React.StatelessComponent = (_) => { - const handleSwiped = (event: React.TouchEvent) => {}; - return ( - -
this is sample code.
-
- ); -}; diff --git a/types/react-swipeable/tsconfig.json b/types/react-swipeable/tsconfig.json deleted file mode 100644 index f3f7bf5b1a..0000000000 --- a/types/react-swipeable/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true, - "jsx": "react" - }, - "files": [ - "index.d.ts", - "react-swipeable-tests.tsx" - ] -} \ No newline at end of file diff --git a/types/react-swipeable/tslint.json b/types/react-swipeable/tslint.json deleted file mode 100644 index f93cf8562a..0000000000 --- a/types/react-swipeable/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "dtslint/dt.json" -}