mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
Add react-native-mail (#35801)
This commit is contained in:
committed by
Sheetal Nandi
parent
a73328b20a
commit
6d32ce4302
Vendored
+37
@@ -0,0 +1,37 @@
|
||||
// Type definitions for react-native-mail 3.0
|
||||
// Project: https://github.com/chirag04/react-native-mail#readme
|
||||
// Definitions by: DELACOURT Vincent <https://github.com/vdelacou>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export namespace Mailer {
|
||||
function mail(options: {
|
||||
subject: string;
|
||||
body: string;
|
||||
isHTML: boolean;
|
||||
recipients?: [string];
|
||||
ccRecipients?: [string];
|
||||
bccRecipients?: [string];
|
||||
attachment?: {
|
||||
/**
|
||||
* The absolute path of the file from which to read data.
|
||||
*/
|
||||
path: string;
|
||||
/**
|
||||
* Mime Type: jpg, png, doc, ppt, html, pdf, csv
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
* Optional: Custom filename for attachment
|
||||
*/
|
||||
name?: string;
|
||||
};
|
||||
}, callback: (
|
||||
error: string,
|
||||
/**
|
||||
* On Android, the callback will only be called if an error occurs. The event argument is unused!
|
||||
*/
|
||||
event: string
|
||||
) => void): void;
|
||||
}
|
||||
|
||||
export default Mailer;
|
||||
@@ -0,0 +1,6 @@
|
||||
import Mailer from "react-native-mail";
|
||||
|
||||
Mailer.mail(
|
||||
{ subject: "", body: "", isHTML: false },
|
||||
(error: string, event: string) => {}
|
||||
);
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": ["es6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": ["index.d.ts", "react-native-mail-tests.ts"]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user