mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-04-22 18:46:26 +08:00
fix(network): update API
This commit is contained in:
parent
28f316e408
commit
ec5e27be4b
@ -1,4 +1,4 @@
|
|||||||
import { Cordova, CordovaProperty, Plugin } from './plugin';
|
import {Cordova, CordovaProperty, Plugin, CordovaFunctionOverride} from './plugin';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
|
||||||
@ -52,10 +52,32 @@ declare var navigator: any;
|
|||||||
export class Network {
|
export class Network {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the network connection type
|
* Connection type
|
||||||
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty
|
@CordovaProperty
|
||||||
static connection: string;
|
static type: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Downlink Max Speed
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
|
@CordovaProperty
|
||||||
|
static downlinkMax: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an observable to watch connection changes
|
||||||
|
* @return {Observable<any>}
|
||||||
|
*/
|
||||||
|
@CordovaFunctionOverride()
|
||||||
|
static onchange(): Observable<any> { return; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an observable to watch connection type changes
|
||||||
|
* @return {Observable<any>}
|
||||||
|
*/
|
||||||
|
@CordovaFunctionOverride()
|
||||||
|
static ontypechange(): Observable<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get notified when the device goes offline
|
* Get notified when the device goes offline
|
||||||
|
Loading…
x
Reference in New Issue
Block a user