Skip to content

Commit

Permalink
feat: added TS declaration file
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustash committed Feb 20, 2022
1 parent 19eb4c8 commit 5c5e63e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { TextInputProps as RNTextInputProps } from "react-native";
declare module "react-native" {
export type ImageChangeEventData = {
uri: string;
data: string;
linkUri?: string;
mime?: string;
};
export type ImageChangeEvent = NativeSyntheticEvent<ImageChangeEventData>;

export interface TextInputProps extends RNTextInputProps {
onImageChange?(event: ImageChangeEvent): void;
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"version": "2.0.1",
"description": "Enables clipboard image pasting and GIFs from TextInput.",
"main": "index.js",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down

0 comments on commit 5c5e63e

Please sign in to comment.