fix(pro): proper callback type and guard for plugin instantiate. #2136 #2127

This commit is contained in:
Max Lynch 2018-01-25 11:11:06 -06:00
parent e4dd8dcb89
commit 61293c33cc

View File

@ -49,9 +49,7 @@ export class ProDeploy {
* Check a channel for an available update
* @return {Promise<string>} Resolves with 'true' or 'false', or rejects with an error.
*/
@CordovaInstance({
observable: true
})
@CordovaInstance()
check(): Promise<string> { return; }
/**
@ -67,7 +65,9 @@ export class ProDeploy {
* Unzip the latest downloaded version
* @return {Observable<any>} Updates with percent completion, or errors with a message.
*/
@CordovaInstance()
@CordovaInstance({
observable: true
})
extract(): Observable<any> { return; }
/**
@ -133,7 +133,7 @@ export class Pro extends IonicNativePlugin {
/**
* Ionic Pro Deploy .js API.
*/
deploy: ProDeploy = new ProDeploy(Pro.getPlugin().deploy);
deploy: ProDeploy = new ProDeploy((Pro.getPlugin() || {}).deploy);
/**
* Not yet implemented