Fix typo in react-touch (SwipConfig)

https://github.com/DefinitelyTyped/DefinitelyTyped/pull/17912#pullrequestreview-49976921
This commit is contained in:
Grzegorz Kielak
2017-07-17 17:13:52 +02:00
parent d14bffff32
commit eda0fee1e6
2 changed files with 5 additions and 5 deletions

View File

@@ -62,9 +62,9 @@ export interface DraggableProps {
export class Draggable extends React.Component<DraggableProps, {}> {
}
export function defineSwipe(config?: SwipConfig): SwipeableConfig;
export function defineSwipe(config?: SwipeConfig): SwipeableConfig;
export interface SwipConfig {
export interface SwipeConfig {
/** @default 100 */
swipeDistance?: number;
}

View File

@@ -2,7 +2,7 @@ import * as React from "react";
import {
CustomGesture,
defineHold, defineSwipe, Draggable, DraggableCallbackArgument, DraggableStyle, Holdable, HoldableConfig,
HoldableProps, HoldConfig, moves, SwipConfig, Swipeable, SwipeableConfig, SwipeableProps
HoldableProps, HoldConfig, moves, SwipeConfig, Swipeable, SwipeableConfig, SwipeableProps
} from "react-touch";
export class HoldableTest extends React.PureComponent<{}> {
@@ -32,8 +32,8 @@ export class DraggableTest extends React.PureComponent<{}> {
export class SwipeableTest extends React.PureComponent<{}> {
render() {
const swipConfig: SwipConfig = {};
const config: SwipeableConfig = defineSwipe(swipConfig);
const swipeConfig: SwipeConfig = {};
const config: SwipeableConfig = defineSwipe(swipeConfig);
const props: SwipeableProps = {
config,
onSwipeLeft: this.swipeHandler,