diff --git a/types/react-native-draggable-flatlist/index.d.ts b/types/react-native-draggable-flatlist/index.d.ts deleted file mode 100644 index 0b96f0b3cd..0000000000 --- a/types/react-native-draggable-flatlist/index.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -// Type definitions for react-native-draggable-flatlist 1.1 -// Project: https://github.com/computerjazz/react-native-draggable-flatlist#readme -// Definitions by: Stack Builders -// Esteban Ibarra -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 - -import { VirtualizedListWithoutRenderItemProps } from "react-native"; -import { Component } from "react"; - -export interface RenderItemInfo { - item: ItemR; - index: number; - move: () => void; - moveEnd: () => void; - isActive: boolean; -} - -export interface OnMoveEndInfo { - data: ReadonlyArray | null; - to: number; - from: number; - row: ItemM; -} - -interface DraggableFlatListProps extends VirtualizedListWithoutRenderItemProps { - /** - * Items to be rendered. - */ - data: ReadonlyArray | null; - - /** - * Function that returns updated ordering of data - */ - onMoveEnd?: (info: OnMoveEndInfo) => void; - - /** - * Function that is called when row becomes active. - */ - onMoveBegin?: (index: number) => void; - - /** - * Sets where scrolling begins. - * - * Default is 5 - */ - scrollPercent?: number; - - /** - * Function that calls move when the row should become active (in an onPress, onLongPress, etc). Calls moveEnd when the gesture is complete (in onPressOut). - */ - renderItem: (info: RenderItemInfo) => React.ReactElement | null; -} - -declare class DraggableFlatList extends Component> { - constructor(props: DraggableFlatListProps); -} - -export default DraggableFlatList; diff --git a/types/react-native-draggable-flatlist/react-native-draggable-flatlist-tests.tsx b/types/react-native-draggable-flatlist/react-native-draggable-flatlist-tests.tsx deleted file mode 100644 index 40d613e4ea..0000000000 --- a/types/react-native-draggable-flatlist/react-native-draggable-flatlist-tests.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import * as React from 'react'; -import { TouchableOpacity, Text } from 'react-native'; -import DraggableFlatList, { RenderItemInfo } from 'react-native-draggable-flatlist'; - -interface Item { - name: string; - mail: string; -} - -class Example extends React.Component { - state = { - data: [ - { name: 'Esteban', mail: 'foo@foo.com' }, - { name: 'Xavier', mail: 'foo2@foo.com' }, - ] - }; - - renderItem({ item, index, move, moveEnd, isActive }: RenderItemInfo) { - return ( - - {index} - {item.name} - {item.mail} - - ); - } - - render() { - const { data } = this.state; - return ( - `draggable-item-${index}`} - scrollPercent={10} - onMoveEnd={({ data }) => this.setState({ data })} - ListFooterComponent={{'Hello'}} - /> - ); - } -} diff --git a/types/react-native-draggable-flatlist/tsconfig.json b/types/react-native-draggable-flatlist/tsconfig.json deleted file mode 100644 index b3c009feac..0000000000 --- a/types/react-native-draggable-flatlist/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true, - "jsx": "react-native" - }, - "files": [ - "index.d.ts", - "react-native-draggable-flatlist-tests.tsx" - ] -} diff --git a/types/react-native-draggable-flatlist/tslint.json b/types/react-native-draggable-flatlist/tslint.json deleted file mode 100644 index 3db14f85ea..0000000000 --- a/types/react-native-draggable-flatlist/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "dtslint/dt.json" }