mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-31 18:49:43 +08:00
feat(web-intent): Add missing type info (#2878)
This commit is contained in:
parent
874be0bb04
commit
3226f76ef9
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user