Skip to content

Commit

Permalink
feat(web-intent): Add missing type info (#2878)
Browse files Browse the repository at this point in the history
  • Loading branch information
JaviRpo authored and danielsogl committed Jan 19, 2019
1 parent 874be0b commit 3226f76
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions src/@ionic-native/plugins/web-intent/index.ts
Expand Up @@ -7,6 +7,27 @@ import {
} from '@ionic-native/core';
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 {
requestCode?: number;
type?: string;
Expand Down Expand Up @@ -192,12 +213,12 @@ export class WebIntent extends IonicNativePlugin {

/**
* Returns the content of the intent used whenever the application activity is launched
* @returns {Observable<string>}
* @returns {Observable<Intent>}
*/
@Cordova({
observable: true
})
onIntent(): Observable<string> {
onIntent(): Observable<Intent> {
return;
}

Expand All @@ -223,13 +244,13 @@ export class WebIntent extends IonicNativePlugin {

/**
* Registers a broadcast receiver for the specified filters
* @param filters {any}
* @param filters {RegisterBroadcastReceiverOptions}
* @returns {Observable<any>}
*/
@Cordova({
observable: true
})
registerBroadcastReceiver(filters: any): Observable<any> {
registerBroadcastReceiver(filters: RegisterBroadcastReceiverOptions): Observable<any> {
return;
}

Expand All @@ -240,10 +261,10 @@ export class WebIntent extends IonicNativePlugin {
unregisterBroadcastReceiver(): void {}

/**
* @returns {Promise<any>}
* @returns {Promise<Intent>}
*/
@Cordova()
getIntent(): Promise<any> {
getIntent(): Promise<Intent> {
return;
}

Expand Down

0 comments on commit 3226f76

Please sign in to comment.