Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jan 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 27 additions & 6 deletions src/@ionic-native/plugins/web-intent/index.ts
Original file line number Diff line number Diff line change
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