Skip to content

Commit d4d15ee

Browse files
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!
1 parent 5accd5c commit d4d15ee

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

index.d.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import * as React from "react";
2+
import * as ReactNative from "react-native";
3+
4+
declare module "react-native-linear-gradient" {
5+
6+
interface LinearGradientProps extends ReactNative.ViewProperties {
7+
colors: string[],
8+
start?: { x: number, y: number },
9+
end?: { x: number, y: number },
10+
locations?: number[]
11+
}
12+
13+
export default class LinearGradient extends React.Component<LinearGradientProps, any> { }
14+
}

0 commit comments

Comments
 (0)