From d4d15ee521d1485558e8ae0a36ec6c0ecb59fb63 Mon Sep 17 00:00:00 2001 From: Paito Anderson Date: Sat, 30 Sep 2017 11:36:05 -0400 Subject: [PATCH] Added TypeScript Typings Not sure if you are interested in supporting Typescript users, but I did this while using your library for myself and thought I would share. Thanks! --- index.d.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..1380673 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,14 @@ +import * as React from "react"; +import * as ReactNative from "react-native"; + +declare module "react-native-linear-gradient" { + + interface LinearGradientProps extends ReactNative.ViewProperties { + colors: string[], + start?: { x: number, y: number }, + end?: { x: number, y: number }, + locations?: number[] + } + + export default class LinearGradient extends React.Component { } +}