add react-native-communications

This commit is contained in:
huhuanming
2017-07-06 14:41:42 +08:00
parent 5f83c2747d
commit 710098f96b
4 changed files with 54 additions and 0 deletions

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;

View File

@@ -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');

View File

@@ -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"
]
}

View File

@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}