Skip to content

Commit

Permalink
Type definition added (#94)
Browse files Browse the repository at this point in the history
Type definition added
Co-authored-by: Calin Tamas <calinntamas@gmail.com>
Co-authored-by: Matheus Castro <matheuscastroweb@gmail.com>
  • Loading branch information
spidi123q authored Nov 30, 2020
1 parent 8e2daee commit c82c643
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
declare module 'react-native-toast-message' {
import React from 'react';
interface ObjectLiteral {
[key: string]: any;
}
const Toast: {
show(options: {
type: 'success' | 'error' | 'info';
position?: 'top' | 'bottom';
text1?: string;
text2?: string;
visibilityTime?: number;
autoHide?: boolean;
topOffset?: number;
bottomOffset?: number;
props?: ObjectLiteral;
onShow?: () => {};
onHide?: () => {};
});
hide: (options?: { onHide: () => any }) => void;
setRef: (ref: any) => any;
} & React.ComponentType<{
ref: (ref: any) => any;
}>;
export default Toast;
}

0 comments on commit c82c643

Please sign in to comment.