You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ja...@apache.org on 2019/05/07 09:24:17 UTC

[cordova-plugin-statusbar] branch master updated: feat: update typings (#132)

This is an automated email from the ASF dual-hosted git repository.

janpio pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-statusbar.git


The following commit(s) were added to refs/heads/master by this push:
     new 003fa61  feat: update typings (#132)
003fa61 is described below

commit 003fa610307f0d2b68aed2cebdc04a939d77912f
Author: Tim Brust <ra...@gmx.de>
AuthorDate: Tue May 7 11:24:12 2019 +0200

    feat: update typings (#132)
    
    This is part of [apache/cordova#39](https://github.com/apache/cordova/issues/39)
---
 types/index.d.ts | 40 ++++++++++++++++++++++------------------
 1 file changed, 22 insertions(+), 18 deletions(-)

diff --git a/types/index.d.ts b/types/index.d.ts
index 87df2e7..caecbef 100644
--- a/types/index.d.ts
+++ b/types/index.d.ts
@@ -1,6 +1,7 @@
-// Type definitions for Apache Cordova StatusBar plugin
+// Type definitions for cordova-plugin-statusbar 2.4
 // Project: https://github.com/apache/cordova-plugin-statusbar
 // Definitions by: Xinkai Chen <https://github.com/Xinkai>
+//                 Tim Brust <https://github.com/timbru31>
 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
 
 /**
@@ -8,65 +9,68 @@
 */
 interface Window {
     StatusBar: StatusBar;
+    addEventListener(type: "statusTap", listener: (ev: Event) => any, useCapture?: boolean): void;
 }
 
-
 /**
 * The StatusBar object provides some functions to customize the iOS and Android StatusBar.
 */
 interface StatusBar {
     /**
     * On iOS 7, make the statusbar overlay or not overlay the WebView.
-    * @param isOverlay         On iOS 7, set to false to make the statusbar appear like iOS 6.
-    *                              Set the style and background color to suit using the other functions.
+    * 
+    * @param isOverlay - On iOS 7, set to false to make the statusbar appear like iOS 6.
+    *                    Set the style and background color to suit using the other functions.
     */
-    overlaysWebView: (isOverlay: boolean) => void;
+    overlaysWebView(isOverlay: boolean): void;
 
     /**
     * Use the default statusbar (dark text, for light backgrounds).
     */
-    styleDefault: () => void;
+    styleDefault(): void;
 
     /**
     * Use the lightContent statusbar (light text, for dark backgrounds).
     */
-    styleLightContent: () => void;
+    styleLightContent(): void;
 
     /**
     * Use the blackTranslucent statusbar (light text, for dark backgrounds).
     */
-    styleBlackTranslucent: () => void;
+    styleBlackTranslucent(): void;
 
     /**
     * Use the blackOpaque statusbar (light text, for dark backgrounds).
     */
-    styleBlackOpaque: () => void;
+    styleBlackOpaque(): void;
 
     /**
     * On iOS 7, when you set StatusBar.statusBarOverlaysWebView to false,
     * you can set the background color of the statusbar by color name.
-    * @param color             Supported color names are:
-    *                              black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
+    *
+    * @param color - Supported color names are:
+    *                black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
     */
-    backgroundColorByName: (color: string) => void;
+    backgroundColorByName(color: string): void;
 
     /**
     * Sets the background color of the statusbar by a hex string.
-    * @param color             CSS shorthand properties are also supported.
-    *                              On iOS 7, when you set StatusBar.statusBarOverlaysWebView to false, you can set the background color of the statusbar by a hex string (#RRGGBB).
-    *                              On WP7 and WP8 you can also specify values as #AARRGGBB, where AA is an alpha value
+    *
+    * @param color - CSS shorthand properties are also supported.
+    *                On iOS 7, when you set StatusBar.statusBarOverlaysWebView to false, you can set the background color of the statusbar by a hex string (#RRGGBB).
+    *                On WP7 and WP8 you can also specify values as #AARRGGBB, where AA is an alpha value
     */
-    backgroundColorByHexString: (color: string) => void;
+    backgroundColorByHexString(color: string): void;
 
     /**
     * Hide the statusbar.
     */
-    hide: () => void;
+    hide(): void;
 
     /**
     * Show the statusbar.
     */
-    show: () => void;
+    show(): void;
 
     /**
     * Read this property to see if the statusbar is visible or not.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org