refactor(launchnavigator):

This commit is contained in:
Guille 2016-07-17 19:58:46 +02:00
parent 24910aacee
commit 0231220c6f

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin'; import { Cordova, Plugin } from './plugin';
export interface LaunchNavigatorOptions { export interface LaunchNavigatorOptions {
@ -15,7 +16,7 @@ export interface LaunchNavigatorOptions {
/** /**
* Start point of the navigation * Start point of the navigation
*/ */
start?: string|number[]; start?: string | number[];
/** /**
* nickname to display in app for start . e.g. "My House". * nickname to display in app for start . e.g. "My House".
@ -98,52 +99,52 @@ export class LaunchNavigator {
errorIndex: 2 errorIndex: 2
}) })
static navigate( static navigate(
destination: string|number[], destination: string | number[],
options?: LaunchNavigatorOptions options?: LaunchNavigatorOptions
): Promise<any> { return; } ): Promise<any> { return; }
/** /**
* Determines if the given app is installed and available on the current device. * Determines if the given app is installed and available on the current device.
* @param app {string} * @param app {string}
*/ */
@Cordova() @Cordova()
static isAppAvailable(app: string): Promise<any> {return; } static isAppAvailable(app: string): Promise<any> { return; }
/** /**
* Returns a list indicating which apps are installed and available on the current device. * Returns a list indicating which apps are installed and available on the current device.
*/ */
@Cordova() @Cordova()
static availableApps(): Promise<string[]> {return; } static availableApps(): Promise<string[]> { return; }
/** /**
* Returns the display name of the specified app. * Returns the display name of the specified app.
* @param app {string} * @param app {string}
*/ */
@Cordova({sync: true}) @Cordova({ sync: true })
static getAppDisplayName(app: string): string {return; } static getAppDisplayName(app: string): string { return; }
/** /**
* Returns list of supported apps on a given platform. * Returns list of supported apps on a given platform.
* @param platform {string} * @param platform {string}
*/ */
@Cordova({sync: true}) @Cordova({ sync: true })
static getAppsForPlatform(platform: string): string[] {return; } static getAppsForPlatform(platform: string): string[] { return; }
/** /**
* Indicates if an app on a given platform supports specification of transport mode. * Indicates if an app on a given platform supports specification of transport mode.
* @param app {string} specified as a string, you can use one of the constants, e.g `LaunchNavigator.APP.GOOGLE_MAPS` * @param app {string} specified as a string, you can use one of the constants, e.g `LaunchNavigator.APP.GOOGLE_MAPS`
* @param platform {string} * @param platform {string}
*/ */
@Cordova({sync: true}) @Cordova({ sync: true })
static supportsTransportMode(app: string, platform: string): boolean {return; } static supportsTransportMode(app: string, platform: string): boolean { return; }
/** /**
* Returns the list of transport modes supported by an app on a given platform. * Returns the list of transport modes supported by an app on a given platform.
* @param app {string} * @param app {string}
* @param platform {string} * @param platform {string}
*/ */
@Cordova({sync: true}) @Cordova({ sync: true })
static getTransportModes(app: string, platform: string): string[] {return; } static getTransportModes(app: string, platform: string): string[] { return; }
/** /**
* Indicates if an app on a given platform supports specification of launch mode. * Indicates if an app on a given platform supports specification of launch mode.
@ -151,25 +152,25 @@ export class LaunchNavigator {
* @param app {string} * @param app {string}
* @param platform {string} * @param platform {string}
*/ */
@Cordova({sync: true}) @Cordova({ sync: true })
static supportsLaunchMode(app: string, platform: string): boolean {return; } static supportsLaunchMode(app: string, platform: string): boolean { return; }
/** /**
* Indicates if an app on a given platform supports specification of start location. * Indicates if an app on a given platform supports specification of start location.
* @param app {string} * @param app {string}
* @param platform {string} * @param platform {string}
*/ */
@Cordova({sync: true}) @Cordova({ sync: true })
static supportsStart(app: string, platform: string): boolean {return; } static supportsStart(app: string, platform: string): boolean { return; }
@Cordova({sync: true}) @Cordova({ sync: true })
static supportsStartName(app: string, platform: string): boolean {return; } static supportsStartName(app: string, platform: string): boolean { return; }
@Cordova({sync: true}) @Cordova({ sync: true })
static supportsDestName(app: string, platform: string): boolean {return; } static supportsDestName(app: string, platform: string): boolean { return; }
@Cordova({sync: true}) @Cordova({ sync: true })
static userSelect(destination: string|number[], options: LaunchNavigatorOptions): void { } static userSelect(destination: string | number[], options: LaunchNavigatorOptions): void { }
static APP: any = { static APP: any = {
USER_SELECT: 'user_select', USER_SELECT: 'user_select',