Merge pull request #17794 from huhuanming/react-native-communications

add react-native-communications
This commit is contained in:
Eloy Durán
2017-07-07 11:51:22 +02:00
committed by GitHub
4 changed files with 54 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
// Type definitions for react-native-communications 2.2
// Project: https://github.com/anarchicknight/react-native-communications
// Definitions by: HuHuanming <https://github.com/huhuanming>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
export function phonecall(phoneNumber: string, isPrompt: boolean): void;
export function email(to: string, cc: string, bcc: string, subject: string, body: string): void;
export function text(phoneNumber?: string | null, body?: string | null): void;
export function textWithoutEncoding(phoneNumber?: string | null, body?: string | null): void;
export function web(address?: string | null): void;
@@ -0,0 +1,16 @@
import { phonecall, email, text, textWithoutEncoding, web } from 'react-native-communications';
phonecall('123456789', true);
email('a@example.com', 'a@example.com', 'a@example.com', 'subject', 'body');
text();
text('123456789');
text('123456789', 'body');
textWithoutEncoding();
textWithoutEncoding('123456789');
textWithoutEncoding('123456789', 'body');
web();
web('https://example.com');
@@ -0,0 +1,24 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react"
},
"files": [
"index.d.ts",
"react-native-communications-tests.ts"
]
}
@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}