feat(web-intent): Add missing type info (#2878)

This commit is contained in:
JaviRpo 2019-01-19 03:26:29 -05:00 committed by Daniel Sogl
parent 874be0bb04
commit 3226f76ef9

View File

@ -7,6 +7,27 @@ import {
} from '@ionic-native/core'; } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable'; import { Observable } from 'rxjs/Observable';
export interface IntentClipItem {
uri: string;
type?: string;
extension?: string;
}
export interface Intent {
action: string;
clipItems: IntentClipItem[];
component: string;
extras: object;
flags: number;
type: string;
}
export interface RegisterBroadcastReceiverOptions {
filterActions?: string[];
filterCategories?: string[];
filterDataSchemes?: string[];
}
export interface IntentOptions { export interface IntentOptions {
requestCode?: number; requestCode?: number;
type?: string; type?: string;
@ -192,12 +213,12 @@ export class WebIntent extends IonicNativePlugin {
/** /**
* Returns the content of the intent used whenever the application activity is launched * Returns the content of the intent used whenever the application activity is launched
* @returns {Observable<string>} * @returns {Observable<Intent>}
*/ */
@Cordova({ @Cordova({
observable: true observable: true
}) })
onIntent(): Observable<string> { onIntent(): Observable<Intent> {
return; return;
} }
@ -223,13 +244,13 @@ export class WebIntent extends IonicNativePlugin {
/** /**
* Registers a broadcast receiver for the specified filters * Registers a broadcast receiver for the specified filters
* @param filters {any} * @param filters {RegisterBroadcastReceiverOptions}
* @returns {Observable<any>} * @returns {Observable<any>}
*/ */
@Cordova({ @Cordova({
observable: true observable: true
}) })
registerBroadcastReceiver(filters: any): Observable<any> { registerBroadcastReceiver(filters: RegisterBroadcastReceiverOptions): Observable<any> {
return; return;
} }
@ -240,10 +261,10 @@ export class WebIntent extends IonicNativePlugin {
unregisterBroadcastReceiver(): void {} unregisterBroadcastReceiver(): void {}
/** /**
* @returns {Promise<any>} * @returns {Promise<Intent>}
*/ */
@Cordova() @Cordova()
getIntent(): Promise<any> { getIntent(): Promise<Intent> {
return; return;
} }