mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-05-20 11:14:34 +00:00
Fix typo in react-touch (SwipConfig)
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/17912#pullrequestreview-49976921
This commit is contained in:
4
types/react-touch/index.d.ts
vendored
4
types/react-touch/index.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user