From 0e9c9931d43b7d8d8921780e9a4fbf097da292fb Mon Sep 17 00:00:00 2001 From: Olaf Erlandsen Date: Fri, 19 May 2017 16:23:06 -0400 Subject: [PATCH] update Adding types for typescript(to using with ionic2) --- .gitignore | 3 ++- typos/index.d.ts | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 typos/index.d.ts diff --git a/.gitignore b/.gitignore index 187adb2..48fad0b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -/nbproject/ \ No newline at end of file +/nbproject/ +.idea/ \ No newline at end of file diff --git a/typos/index.d.ts b/typos/index.d.ts new file mode 100644 index 0000000..2523985 --- /dev/null +++ b/typos/index.d.ts @@ -0,0 +1,44 @@ +/** + * @interface + * */ +export interface Window { + powerManagement : PowerManagementInterface +} +/** + * @interface + */ +export interface PowerManagementInterface { + /** + * @param {Function} success + * @param {Function} failure + * @param {boolean} runLockScreen + * @return {void} + */ + acquire (success?:Function, failure?:Function, runLockScreen?:boolean):void; + /** + * + * @param success + * @param failure + * @return {void} + */ + release (success:Function, failure:Function):void; + /*** + * + * @param enabled + * @param success + * @param failure + * @return {void} + */ + setReleaseOnPause (enabled, success:Function, failure:Function):void; + /** + * + * @param success + * @param failure + * @return {void} + */ + dim (success:Function, failure:Function):void; +} +/** + * + * */ +export var powerManagement : PowerManagementInterface;