From e9e51805dff3b4d1f7202f1eb31fe430c03822ed Mon Sep 17 00:00:00 2001 From: Scott Beca Date: Wed, 5 Jun 2019 20:40:02 +1000 Subject: [PATCH] Add Typescript typings --- package.json | 2 ++ typings/index.d.ts | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 typings/index.d.ts diff --git a/package.json b/package.json index 40104d2..8e04551 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,8 @@ }, "license": "MIT", "homepage": "https://github.com/madsleejensen/react-native-image-sequence", + "main": "index.js", + "types": "typings/index.d.ts", "keywords": [ "react-native", "native", diff --git a/typings/index.d.ts b/typings/index.d.ts new file mode 100644 index 0000000..c413d58 --- /dev/null +++ b/typings/index.d.ts @@ -0,0 +1,17 @@ +import { Component } from 'react'; + +interface ImageSequenceProps { + /** An array of source images. Each element of the array should be the result of a call to require(imagePath). */ + images: any[]; + /** Which index of the images array should the sequence start at. Default: 0 */ + startFrameIndex?: number; + /** Playback speed of the image sequence. Default: 24 */ + framesPerSecond?: number; + /** Should the sequence loop. Default: true */ + loop?: boolean; +} + +declare class ImageSequence extends Component { +} + +export default ImageSequence;