mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-21 13:27:15 +08:00
add react-native-communications
This commit is contained in:
11
types/react-native-communications/index.d.ts
vendored
Normal file
11
types/react-native-communications/index.d.ts
vendored
Normal 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');
|
||||
24
types/react-native-communications/tsconfig.json
Normal file
24
types/react-native-communications/tsconfig.json
Normal 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"
|
||||
]
|
||||
}
|
||||
3
types/react-native-communications/tslint.json
Normal file
3
types/react-native-communications/tslint.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Reference in New Issue
Block a user