-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from bradmartin/master
TypeScript definition/examples
- Loading branch information
Showing
3 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* Initiate a phone call. | ||
* @param {string} number - The number to dial. | ||
* @param {boolean} confirm - To enable OS specific confirmation before dialing. | ||
*/ | ||
export function dial(number: string, confirm: boolean); | ||
|
||
|
||
/** | ||
* Open the OS specific SMS app. | ||
* @param {Array<string>} numbers - The number to send SMS to. | ||
* @param {string} message - The message to send. | ||
*/ | ||
export function sms(numbers: Array<string>, message: string): Promise<response>; | ||
|
||
|
||
interface response { | ||
"success": string, | ||
"cancelled": string, | ||
"failed": string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
"version": "1.1.0", | ||
"description": "A phone NativeScript module for Android and iOS", | ||
"main": "index.js", | ||
"typings": "index.d.ts", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/msywensky/nativescript-phone.git" | ||
|
@@ -11,6 +12,13 @@ | |
"NativeScript" | ||
], | ||
"author": "Mike Sywensky <[email protected]> ", | ||
"contributors": [ | ||
{ | ||
"name": "Brad Martin", | ||
"email": " [email protected]", | ||
"url": "https://github.com/bradmartin" | ||
} | ||
], | ||
"license": { | ||
"type": "MIT", | ||
"url": "https://github.com/msywensky/nativescript-phone/blob/master/LICENSE" | ||
|
@@ -25,4 +33,4 @@ | |
"ios": "1.0.0" | ||
} | ||
} | ||
} | ||
} |