From 52fbfebcb6051948ac425ac5e2c797c3ed3bc04b Mon Sep 17 00:00:00 2001 From: Konstantin Vasilev Date: Mon, 5 Jun 2017 12:01:17 +0300 Subject: [PATCH] fix single module declaration --- types/react-swipeable/index.d.ts | 62 ++++++++++++++++---------------- 1 file changed, 30 insertions(+), 32 deletions(-) diff --git a/types/react-swipeable/index.d.ts b/types/react-swipeable/index.d.ts index da72f528e3..489964ee0c 100644 --- a/types/react-swipeable/index.d.ts +++ b/types/react-swipeable/index.d.ts @@ -4,38 +4,36 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 -declare module 'react-swipeable' { - import * as React from 'react'; +import * as React from 'react'; - 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; +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 Props 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; - children?: React.ReactNode; - } - - class ReactSwipeable extends React.Component {} - namespace ReactSwipeable {} - - export = ReactSwipeable; +interface Props 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; + children?: React.ReactNode; } + +declare class ReactSwipeable extends React.Component {} +declare namespace ReactSwipeable {} + +export = ReactSwipeable;