mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-04-06 06:59:10 +08:00
refactor: follow array-type lint rule
This commit is contained in:
parent
60a7190eda
commit
c9d41ebd8a
@ -19,7 +19,7 @@ function overrideFunction(pluginObj: any, methodName: string): Observable<any> {
|
||||
export function cordovaFunctionOverride(
|
||||
pluginObj: any,
|
||||
methodName: string,
|
||||
args: IArguments | Array<any> = []
|
||||
args: IArguments | any[] = []
|
||||
) {
|
||||
return overrideFunction(pluginObj, methodName);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { wrapInstance } from './common';
|
||||
import { CordovaOptions } from './interfaces';
|
||||
|
||||
export function cordovaInstance(pluginObj: any, methodName: string, config: CordovaOptions, args: IArguments | Array<any>) {
|
||||
export function cordovaInstance(pluginObj: any, methodName: string, config: CordovaOptions, args: IArguments | any[]) {
|
||||
args = Array.from(args);
|
||||
return wrapInstance(pluginObj, methodName, config).apply(this, args);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { wrap } from './common';
|
||||
import { CordovaOptions } from './interfaces';
|
||||
|
||||
export function cordova(pluginObj: any, methodName: string, config: CordovaOptions, args: IArguments | Array<any>) {
|
||||
export function cordova(pluginObj: any, methodName: string, config: CordovaOptions, args: IArguments | any[]) {
|
||||
return wrap(pluginObj, methodName, config).apply(this, args);
|
||||
}
|
||||
|
@ -21,12 +21,12 @@ export interface TextCaptureOptions {
|
||||
* for example: ["English", "French", "German"]. Empty array
|
||||
* disables language selection.
|
||||
*/
|
||||
selectableRecognitionLanguages?: Array<string>;
|
||||
selectableRecognitionLanguages?: string[];
|
||||
|
||||
/**
|
||||
* Recognition language selected by default.
|
||||
*/
|
||||
recognitionLanguages?: Array<string>;
|
||||
recognitionLanguages?: string[];
|
||||
|
||||
/**
|
||||
* Width and height of the recognition area, separated by a
|
||||
@ -75,7 +75,7 @@ export interface TextCaptureResult {
|
||||
* · rect (string): position and size of the bounding rectangle,
|
||||
* a string of 4 integers separated with whitespaces ("x y width height").
|
||||
*/
|
||||
textLines: Array<{ text: string, quadrangle: string, rect?: string }>;
|
||||
textLines: { text: string, quadrangle: string, rect?: string }[];
|
||||
|
||||
/**
|
||||
* Additional information. This object has the following keys:
|
||||
@ -94,7 +94,7 @@ export interface TextCaptureResult {
|
||||
stabilityStatus: string,
|
||||
userAction: string,
|
||||
frameSize: string,
|
||||
recognitionLanguages: Array<string>
|
||||
recognitionLanguages: string[]
|
||||
};
|
||||
|
||||
/**
|
||||
@ -136,8 +136,8 @@ export interface DataCaptureOptions {
|
||||
customDataCaptureScenario?: {
|
||||
name: string,
|
||||
description: string,
|
||||
recognitionLanguages: Array<string>,
|
||||
fields: Array<{ regEx: string }>
|
||||
recognitionLanguages: string[],
|
||||
fields: { regEx: string }[]
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -223,7 +223,7 @@ export class AndroidPermissions extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Request permissions
|
||||
* @param {Array<string>} permissions An array with permissions
|
||||
* @param {string[]} permissions An array with permissions
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
|
@ -7,8 +7,8 @@ export interface CallDirectoryItem {
|
||||
}
|
||||
|
||||
export interface CallDirectoryLog {
|
||||
plugin: Array<string>;
|
||||
extension: Array<string>;
|
||||
plugin: string[];
|
||||
extension: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -62,21 +62,21 @@ export class CallDirectory extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Add identification numbers
|
||||
* @param {Array<CallDirectoryItem>} items Set of numbers with labels
|
||||
* @param {CallDirectoryItem[]} items Set of numbers with labels
|
||||
* @return {Promise<any>} Returns a promise that resolves when numbers are added
|
||||
*/
|
||||
@Cordova()
|
||||
addIdentification(items: Array<CallDirectoryItem>): Promise<any> {
|
||||
addIdentification(items: CallDirectoryItem[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove identification numbers
|
||||
* @param {Array<CallDirectoryItem>} items Set of numbers with arbitrary label
|
||||
* @param {CallDirectoryItem[]} items Set of numbers with arbitrary label
|
||||
* @return {Promise<any>} Returns a promise that resolves when numbers are removed
|
||||
*/
|
||||
@Cordova()
|
||||
removeIdentification(items: Array<CallDirectoryItem>): Promise<any> {
|
||||
removeIdentification(items: CallDirectoryItem[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -91,10 +91,10 @@ export class CallDirectory extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Get all numbers and labels in call directory
|
||||
* @return {Array<CallDirectoryItem>} Returns a promise that resolves with an array of all items
|
||||
* @return {CallDirectoryItem[]} Returns a promise that resolves with an array of all items
|
||||
*/
|
||||
@Cordova()
|
||||
getAllItems(): Promise<Array<CallDirectoryItem>> {
|
||||
getAllItems(): Promise<CallDirectoryItem[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface CallLogObject {
|
||||
name: string;
|
||||
value: string | Array<string>;
|
||||
value: string | string[];
|
||||
operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'like';
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ export class Dialogs extends IonicNativePlugin {
|
||||
* Displays a customizable confirmation dialog box.
|
||||
* @param {string} message Dialog message.
|
||||
* @param {string} [title] Dialog title. (Optional, defaults to Confirm)
|
||||
* @param {Array<string>} [buttonLabels] Array of strings specifying button labels. (Optional, defaults to [OK,Cancel])
|
||||
* @param {string[]} [buttonLabels] Array of strings specifying button labels. (Optional, defaults to [OK,Cancel])
|
||||
* @returns {Promise<number>} Returns a promise that resolves the button index that was clicked, or 0 if the user has dismissed the dialog by clicking outside the dialog box. Note that the index use one-based indexing.
|
||||
*/
|
||||
@Cordova({
|
||||
@ -84,7 +84,7 @@ export class Dialogs extends IonicNativePlugin {
|
||||
* Displays a native dialog box that is more customizable than the browser's prompt function.
|
||||
* @param {string} [message] Dialog message.
|
||||
* @param {string} [title] Dialog title. (Optional, defaults to Prompt)
|
||||
* @param {Array<string>} [buttonLabels] Array of strings specifying button labels. (Optional, defaults to ["OK","Cancel"])
|
||||
* @param {string[]} [buttonLabels] Array of strings specifying button labels. (Optional, defaults to ["OK","Cancel"])
|
||||
* @param {string} [defaultText] Default text box input value. (Optional, Default: empty string)
|
||||
* @returns {Promise<DialogsPromptCallback>} Returns a promise that resolves an object with the button index clicked and the text entered
|
||||
*/
|
||||
|
@ -78,7 +78,7 @@ export class DocumentViewer extends IonicNativePlugin {
|
||||
*
|
||||
* @param url {string} Url to the file
|
||||
* @param contentType {string} Content type of the file
|
||||
* @param options {Array<DocumentViewerOptions>} options
|
||||
* @param options {DocumentViewerOptions} options
|
||||
* @param [onPossible] {Function}
|
||||
* @param [onMissingApp] {Function}
|
||||
* @param [onImpossible] {Function}
|
||||
|
@ -16,17 +16,17 @@ export interface EmailComposerOptions {
|
||||
/**
|
||||
* Email address(es) for To field
|
||||
*/
|
||||
to?: string | Array<string>;
|
||||
to?: string | string[];
|
||||
|
||||
/**
|
||||
* Email address(es) for CC field
|
||||
*/
|
||||
cc?: string | Array<string>;
|
||||
cc?: string | string[];
|
||||
|
||||
/**
|
||||
* Email address(es) for BCC field
|
||||
*/
|
||||
bcc?: string | Array<string>;
|
||||
bcc?: string | string[];
|
||||
|
||||
/**
|
||||
* File paths or base64 data streams
|
||||
|
@ -120,7 +120,7 @@ export class Geofence extends IonicNativePlugin {
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
addOrUpdate(geofences: Object | Array<Object>): Promise<void> {
|
||||
addOrUpdate(geofences: Object | Object[]): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ export class Geofence extends IonicNativePlugin {
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
remove(geofenceId: string | Array<string>): Promise<void> {
|
||||
remove(geofenceId: string | string[]): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -148,7 +148,7 @@ export class Geofence extends IonicNativePlugin {
|
||||
/**
|
||||
* Returns an array of geofences currently being monitored.
|
||||
*
|
||||
* @returns {Promise<Array<string>>}
|
||||
* @returns {Promise<string[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
getWatched(): Promise<string> {
|
||||
|
@ -126,7 +126,7 @@ export class Globalization extends IonicNativePlugin {
|
||||
/**
|
||||
* Returns an array of the names of the months or days of the week, depending on the client's user preferences and calendar.
|
||||
* @param options Object with type (narrow or wide) and item (month or days).
|
||||
* @returns {Promise<{value: Array<string>}>} Returns a promise.
|
||||
* @returns {Promise<{value: string[]}>} Returns a promise.
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
@ -134,7 +134,7 @@ export class Globalization extends IonicNativePlugin {
|
||||
getDateNames(options: {
|
||||
type: string;
|
||||
item: string;
|
||||
}): Promise<{ value: Array<string> }> {
|
||||
}): Promise<{ value: string[] }> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -207,7 +207,6 @@ export interface HealthData {
|
||||
})
|
||||
@Injectable()
|
||||
export class Health extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Tells if either Google Fit or HealthKit are available.
|
||||
*
|
||||
@ -254,11 +253,11 @@ export class Health extends IonicNativePlugin {
|
||||
* In Android 6 and over, this function will also ask for some dynamic permissions if needed
|
||||
* (e.g. in the case of "distance", it will need access to ACCESS_FINE_LOCATION).
|
||||
*
|
||||
* @param {Array<string | HealthDataType>} datatypes a list of data types you want to be granted access to.
|
||||
* @param {string[] | HealthDataType[]} datatypes a list of data types you want to be granted access to.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
requestAuthorization(datatypes: Array<string | HealthDataType>): Promise<any> {
|
||||
requestAuthorization(datatypes: string[] | HealthDataType[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -270,11 +269,11 @@ export class Health extends IonicNativePlugin {
|
||||
* In iOS, this function will only check authorization status for writeable data.
|
||||
* Read-only data will always be considered as not authorized. This is an intended behaviour of HealthKit.
|
||||
*
|
||||
* @param {Array<string | HealthDataType>} datatypes a list of data types you want to check access of, same as in requestAuthorization
|
||||
* @param {string[] | HealthDataType[]} datatypes a list of data types you want to check access of, same as in requestAuthorization
|
||||
* @return {Promise<boolean>} Returns a promise that resolves with a boolean that indicates the authorization status
|
||||
*/
|
||||
@Cordova()
|
||||
isAuthorized(datatypes: Array<string | HealthDataType>): Promise<boolean> {
|
||||
isAuthorized(datatypes: string[] | HealthDataType[]): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -310,7 +309,9 @@ export class Health extends IonicNativePlugin {
|
||||
* @return {Promise<HealthData[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
query(queryOptions: HealthQueryOptions): Promise<HealthData[]> { return; }
|
||||
query(queryOptions: HealthQueryOptions): Promise<HealthData[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets aggregated data in a certain time window. Usually the sum is returned for the given quantity.
|
||||
@ -334,7 +335,9 @@ export class Health extends IonicNativePlugin {
|
||||
* @return {Promise<HealthData[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
queryAggregated(queryOptionsAggregated: HealthQueryOptionsAggregated): Promise<HealthData[]> {
|
||||
queryAggregated(
|
||||
queryOptionsAggregated: HealthQueryOptionsAggregated
|
||||
): Promise<HealthData[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -356,5 +359,4 @@ export class Health extends IonicNativePlugin {
|
||||
store(storeOptions: HealthStoreOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ export interface HotspotDevice {
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.hotspot.scanWifi().then((networks: Array<HotspotNetwork>) => {
|
||||
* this.hotspot.scanWifi().then((networks: HotspotNetwork[]) => {
|
||||
* console.log(networks);
|
||||
* });
|
||||
*
|
||||
@ -215,10 +215,10 @@ export class Hotspot extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<Array<HotspotDevice>>}
|
||||
* @returns {Promise<HotspotDevice[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
getAllHotspotDevices(): Promise<Array<HotspotDevice>> {
|
||||
getAllHotspotDevices(): Promise<HotspotDevice[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -254,7 +254,7 @@ export class Hotspot extends IonicNativePlugin {
|
||||
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
|
||||
*/
|
||||
@Cordova()
|
||||
connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: Array<string>): Promise<void> {
|
||||
connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: string[]): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -331,18 +331,18 @@ export class Hotspot extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<Array<HotspotNetwork>>}
|
||||
* @returns {Promise<HotspotNetwork[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
scanWifi(): Promise<Array<HotspotNetwork>> {
|
||||
scanWifi(): Promise<HotspotNetwork[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<Array<HotspotNetwork>>}
|
||||
* @returns {Promise<HotspotNetwork[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
scanWifiByLevel(): Promise<Array<HotspotNetwork>> {
|
||||
scanWifiByLevel(): Promise<HotspotNetwork[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ export interface IAPProductOptions {
|
||||
type: string;
|
||||
}
|
||||
|
||||
export type IAPProducts = Array<IAPProduct> & {
|
||||
export type IAPProducts = IAPProduct[] & {
|
||||
/**
|
||||
* Get product by ID
|
||||
*/
|
||||
|
@ -21,7 +21,7 @@ export interface IndexItem {
|
||||
/**
|
||||
* Item keywords
|
||||
*/
|
||||
keywords?: Array<string>;
|
||||
keywords?: string[];
|
||||
|
||||
/**
|
||||
* Lifetime in minutes
|
||||
@ -89,31 +89,31 @@ export class IndexAppContent extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Add or change items to spotlight index
|
||||
* @param {Array<IndexItem>} items Array of items to index
|
||||
* @return {Promise<any>} Returns if index set was successfull
|
||||
* @param {IndexItem[]} items Array of items to index
|
||||
* @return {Promise<any>} Returns if index set was successfully
|
||||
*/
|
||||
@Cordova()
|
||||
setItems(items: Array<IndexItem>): Promise<any> {
|
||||
setItems(items: IndexItem[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear all items stored for a given array of domains
|
||||
* @param {Array<string>} domains Array of domains to clear
|
||||
* @return {Promise<any>} Resolve if successfull
|
||||
* @param {string[]} domains Array of domains to clear
|
||||
* @return {Promise<any>} Resolve if successfully
|
||||
*/
|
||||
@Cordova()
|
||||
clearItemsForDomains(domains: Array<string>): Promise<any> {
|
||||
clearItemsForDomains(domains: string[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear all items stored for a given array of identifiers
|
||||
* @param {Array<string>} identifiers Array of identifiers to clear
|
||||
* @return {Promise<any>} Resolve if successfull
|
||||
* @param {string[]} identifiers Array of identifiers to clear
|
||||
* @return {Promise<any>} Resolve if successfully
|
||||
*/
|
||||
@Cordova()
|
||||
clearItemsForIdentifiers(identifiers: Array<string>): Promise<any> {
|
||||
clearItemsForIdentifiers(identifiers: string[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ export class IntelSecurityData {
|
||||
* @returns {Promise<Array>} Returns a promise that resolves to an array of owners' unique IDs, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getOwners(instanceID: any): Promise<Array<any>> {
|
||||
getOwners(instanceID: any): Promise<any[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -125,7 +125,7 @@ export class IntelSecurityData {
|
||||
* @returns {Promise<Array>} Returns a promise that resolves to a list of web owners, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getWebOwners(instanceID: any): Promise<Array<any>> {
|
||||
getWebOwners(instanceID: any): Promise<any[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -485,12 +485,12 @@ export interface ILocalNotification {
|
||||
export class LocalNotifications extends IonicNativePlugin {
|
||||
/**
|
||||
* Schedules a single or multiple notifications
|
||||
* @param options {Notification | Array<ILocalNotification>} optional
|
||||
* @param options {Notification | ILocalNotification[]} optional
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
schedule(options?: ILocalNotification | Array<ILocalNotification>): void {}
|
||||
schedule(options?: ILocalNotification | ILocalNotification[]): void {}
|
||||
|
||||
/**
|
||||
* Updates a previously scheduled notification. Must include the id in the options parameter.
|
||||
@ -571,28 +571,28 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Get all the notification ids
|
||||
* @returns {Promise<Array<number>>}
|
||||
* @returns {Promise<number[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
getIds(): Promise<Array<number>> {
|
||||
getIds(): Promise<number[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the ids of triggered notifications
|
||||
* @returns {Promise<Array<number>>}
|
||||
* @returns {Promise<number[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
getTriggeredIds(): Promise<Array<number>> {
|
||||
getTriggeredIds(): Promise<number[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the ids of scheduled notifications
|
||||
* @returns {Promise<Array<number>>} Returns a promise
|
||||
* @returns {Promise<number[]>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
getScheduledIds(): Promise<Array<number>> {
|
||||
getScheduledIds(): Promise<number[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -628,28 +628,28 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Get all notification objects
|
||||
* @returns {Promise<Array<ILocalNotification>>}
|
||||
* @returns {Promise<ILocalNotification[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
getAll(): Promise<Array<ILocalNotification>> {
|
||||
getAll(): Promise<ILocalNotification[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all scheduled notification objects
|
||||
* @returns {Promise<Array<ILocalNotification>>}
|
||||
* @returns {Promise<ILocalNotification[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
getAllScheduled(): Promise<Array<ILocalNotification>> {
|
||||
getAllScheduled(): Promise<ILocalNotification[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all triggered notification objects
|
||||
* @returns {Promise<Array<ILocalNotification>>}
|
||||
* @returns {Promise<ILocalNotification[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
getAllTriggered(): Promise<Array<ILocalNotification>> {
|
||||
getAllTriggered(): Promise<ILocalNotification[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -680,7 +680,7 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
@Cordova()
|
||||
addActions(
|
||||
groupId: any,
|
||||
actions: Array<ILocalNotificationAction>
|
||||
actions: ILocalNotificationAction[]
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
@ -251,7 +251,7 @@ export class MixpanelPeople extends IonicNativePlugin {
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
unset(propertiesArray: Array<string>): Promise<any> {
|
||||
unset(propertiesArray: string[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -563,7 +563,7 @@ export class OneSignal extends IonicNativePlugin {
|
||||
/**
|
||||
* Deletes tags that were previously set on a user with `sendTag` or `sendTags`.
|
||||
*
|
||||
* @param {Array<string>} Keys to remove.
|
||||
* @param {string[]} Keys to remove.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
deleteTags(keys: string[]): void {}
|
||||
|
@ -150,7 +150,7 @@ export class PayPal extends IonicNativePlugin {
|
||||
/**
|
||||
* Please Read Docs on Profile Sharing at https://github.com/paypal/PayPal-iOS-SDK#profile-sharing
|
||||
*
|
||||
* @param {Array<string>} scopes scopes Set of requested scope-values. Accepted scopes are: openid, profile, address, email, phone, futurepayments and paypalattributes
|
||||
* @param {string[]} scopes scopes Set of requested scope-values. Accepted scopes are: openid, profile, address, email, phone, futurepayments and paypalattributes
|
||||
* See https://developer.paypal.com/docs/integration/direct/identity/attributes/ for more details
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@ -205,7 +205,7 @@ export class PayPalPayment {
|
||||
/**
|
||||
* Optional array of PayPalItem objects.
|
||||
*/
|
||||
items: Array<PayPalItem>;
|
||||
items: PayPalItem[];
|
||||
/**
|
||||
* Optional payee email, if your app is paying a third-party merchant.
|
||||
* The payee's email. It must be a valid PayPal email address.
|
||||
|
@ -152,14 +152,14 @@ export interface PinterestPin {
|
||||
* .catch(err => console.error('Error loggin in', err));
|
||||
*
|
||||
* this.pinterest.getMyPins()
|
||||
* .then((pins: Array<PinterestPin>) => console.log(pins))
|
||||
* .then((pins: PinterestPin[]) => console.log(pins))
|
||||
* .catch(err => console.error(err));
|
||||
*
|
||||
* this.pinterest.getMe()
|
||||
* .then((user: PinterestUser) => console.log(user));
|
||||
*
|
||||
* this.pinterest.getMyBoards()
|
||||
* .then((boards: Array<PinterestBoard>) => console.log(boards));
|
||||
* .then((boards: PinterestBoard[]) => console.log(boards));
|
||||
*
|
||||
* ```
|
||||
* @interfaces
|
||||
@ -192,7 +192,7 @@ export class Pinterest extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Logs the user in using their Pinterest account.
|
||||
* @param scopes {Array<string>} Array of scopes that you need access to. You can use Pinterest.SCOPES constant for convenience.
|
||||
* @param scopes {string[]} Array of scopes that you need access to. You can use Pinterest.SCOPES constant for convenience.
|
||||
* @returns {Promise<any>} The response object will contain the user's profile data, as well as the access token (if you need to use it elsewhere, example: send it to your server and perform actions on behalf of the user).
|
||||
*/
|
||||
@Cordova()
|
||||
@ -216,12 +216,12 @@ export class Pinterest extends IonicNativePlugin {
|
||||
*
|
||||
* @param fields {string} Optional fields separated by comma
|
||||
* @param limit {number} Optional limit, defaults to 100, maximum is 100.
|
||||
* @returns {Promise<Array<PinterestPin>>}
|
||||
* @returns {Promise<PinterestPin[]>}
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
getMyPins(fields?: string, limit?: number): Promise<Array<PinterestPin>> {
|
||||
getMyPins(fields?: string, limit?: number): Promise<PinterestPin[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -229,12 +229,12 @@ export class Pinterest extends IonicNativePlugin {
|
||||
*
|
||||
* @param fields {string} Optional fields separated by comma
|
||||
* @param limit {number} Optional limit, defaults to 100, maximum is 100.
|
||||
* @returns {Promise<Array<PinterestBoard>>}
|
||||
* @returns {Promise<PinterestBoard[]>}
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
getMyBoards(fields?: string, limit?: number): Promise<Array<PinterestBoard>> {
|
||||
getMyBoards(fields?: string, limit?: number): Promise<PinterestBoard[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -242,12 +242,12 @@ export class Pinterest extends IonicNativePlugin {
|
||||
* Get the authenticated user's likes.
|
||||
* @param fields {string} Optional fields separated by comma
|
||||
* @param limit {number} Optional limit, defaults to 100, maximum is 100.
|
||||
* @returns {Promise<Array<PinterestPin>>}
|
||||
* @returns {Promise<PinterestPin[]>}
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
getMyLikes(fields?: string, limit?: number): Promise<Array<PinterestPin>> {
|
||||
getMyLikes(fields?: string, limit?: number): Promise<PinterestPin[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -255,12 +255,12 @@ export class Pinterest extends IonicNativePlugin {
|
||||
* Get the authenticated user's followers.
|
||||
* @param fields {string} Optional fields separated by comma
|
||||
* @param limit {number} Optional limit, defaults to 100, maximum is 100.
|
||||
* @returns {Promise<Array<PinterestUser>>}
|
||||
* @returns {Promise<PinterestUser[]>}
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
getMyFollowers(fields?: string, limit?: number): Promise<Array<PinterestUser>> {
|
||||
getMyFollowers(fields?: string, limit?: number): Promise<PinterestUser[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -268,12 +268,12 @@ export class Pinterest extends IonicNativePlugin {
|
||||
* Get the authenticated user's followed boards.
|
||||
* @param fields {string} Optional fields separated by comma
|
||||
* @param limit {number} Optional limit, defaults to 100, maximum is 100.
|
||||
* @returns {Promise<Array<PinterestBoard>>}
|
||||
* @returns {Promise<PinterestBoard[]>}
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
getMyFollowedBoards(fields?: string, limit?: number): Promise<Array<PinterestBoard>> {
|
||||
getMyFollowedBoards(fields?: string, limit?: number): Promise<PinterestBoard[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -323,13 +323,13 @@ export class Pinterest extends IonicNativePlugin {
|
||||
* @param boardId {string} The ID of the board
|
||||
* @param fields {string} Optional fields separated by comma
|
||||
* @param limit {number} Optional limit, defaults to 100, maximum is 100.
|
||||
* @returns {Promise<Array<PinterestPin>>}
|
||||
* @returns {Promise<PinterestPin[]>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
})
|
||||
getBoardPins(boardId: string, fields?: string, limit?: number): Promise<Array<PinterestPin>> {
|
||||
getBoardPins(boardId: string, fields?: string, limit?: number): Promise<PinterestPin[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ export interface SmsOptionsAndroid {
|
||||
export class SMS extends IonicNativePlugin {
|
||||
/**
|
||||
* Sends sms to a number
|
||||
* @param phoneNumber {string|Array<string>} Phone number
|
||||
* @param phoneNumber {string|string[]} Phone number
|
||||
* @param message {string} Message
|
||||
* @param options {SmsOptions} Options
|
||||
* @returns {Promise<any>} Resolves promise when the SMS has been sent
|
||||
|
@ -72,7 +72,7 @@ export interface SpeechRecognitionListeningOptionsAndroid {
|
||||
* // Start the recognition process
|
||||
* this.speechRecognition.startListening(options)
|
||||
* .subscribe(
|
||||
* (matches: Array<string>) => console.log(matches),
|
||||
* (matches: string[]) => console.log(matches),
|
||||
* (onerror) => console.log('error:', onerror)
|
||||
* )
|
||||
*
|
||||
@ -82,7 +82,7 @@ export interface SpeechRecognitionListeningOptionsAndroid {
|
||||
* // Get the list of supported languages
|
||||
* this.speechRecognition.getSupportedLanguages()
|
||||
* .then(
|
||||
* (languages: Array<string>) => console.log(languages),
|
||||
* (languages: string[]) => console.log(languages),
|
||||
* (error) => console.log(error)
|
||||
* )
|
||||
*
|
||||
@ -119,7 +119,7 @@ export class SpeechRecognition extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Start the recognition process
|
||||
* @return {Promise< Array<string> >} list of recognized terms
|
||||
* @return {Promise< string[] >} list of recognized terms
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse',
|
||||
@ -127,7 +127,7 @@ export class SpeechRecognition extends IonicNativePlugin {
|
||||
})
|
||||
startListening(
|
||||
options?: SpeechRecognitionListeningOptions
|
||||
): Observable<Array<string>> {
|
||||
): Observable<string[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -141,10 +141,10 @@ export class SpeechRecognition extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Get the list of supported languages
|
||||
* @return {Promise< Array<string> >} list of languages
|
||||
* @return {Promise< string[] >} list of languages
|
||||
*/
|
||||
@Cordova()
|
||||
getSupportedLanguages(): Promise<Array<string>> {
|
||||
getSupportedLanguages(): Promise<string[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -125,11 +125,11 @@ export class SQLiteObject {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param sqlStatements {Array<string | string[] | any>}
|
||||
* @param sqlStatements {string[] | string[][] | any[]}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@CordovaInstance()
|
||||
sqlBatch(sqlStatements: Array<string | string[] | any>): Promise<any> {
|
||||
sqlBatch(sqlStatements: string[] | string[][] | any[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -136,13 +136,13 @@ export interface PrintCommand {
|
||||
* Data (Command) is added to the command buffer. Takes an array of bytes.
|
||||
* Example: {appendBytes:[0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x2e]}
|
||||
*/
|
||||
appendBytes?: Array<number>;
|
||||
appendBytes?: number[];
|
||||
|
||||
/**
|
||||
* Data (Command) is added to the command buffer. Takes an array of bytes.
|
||||
* Example: {appendRawBytes:[0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x2e]}
|
||||
*/
|
||||
appendRawBytes?: Array<number>;
|
||||
appendRawBytes?: number[];
|
||||
|
||||
/**
|
||||
* Set command of the character space is generated and added to the command buffer. Character Spacs (Unit: Dots) Example: 4
|
||||
@ -241,7 +241,7 @@ export interface PrintCommand {
|
||||
* Example: {appendHorizontalTabPosition:[15, 35]}
|
||||
* Delete positions Example: {appendHorizontalTabPosition:[]}
|
||||
*/
|
||||
appendHorizontalTabPosition?: Array<number>;
|
||||
appendHorizontalTabPosition?: number[];
|
||||
|
||||
/**
|
||||
* Print command of the logo is generated and added to the command buffer. The logo has to be uploaded to the printer using the Star Print utility.
|
||||
|
@ -85,7 +85,7 @@ export interface ThreeDeeTouchForceTouch {
|
||||
* );
|
||||
*
|
||||
*
|
||||
* let actions: Array<ThreeDeeTouchQuickAction> = [
|
||||
* let actions: ThreeDeeTouchQuickAction[] = [
|
||||
* {
|
||||
* type: 'checkin',
|
||||
* title: 'Check in',
|
||||
@ -164,7 +164,7 @@ export class ThreeDeeTouch extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
configureQuickActions(quickActions: Array<ThreeDeeTouchQuickAction>): void {}
|
||||
configureQuickActions(quickActions: ThreeDeeTouchQuickAction[]): void {}
|
||||
|
||||
/**
|
||||
* When a home icon is pressed, your app launches and this JS callback is invoked.
|
||||
|
@ -40,12 +40,12 @@ export class Vibration extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Vibrates the device for given amount of time.
|
||||
* @param time {number|Array<number>} Milliseconds to vibrate the device. If passed an array of numbers, it will define a vibration pattern. Pass 0 to stop any vibration immediately.
|
||||
* @param time {number|number[]} Milliseconds to vibrate the device. If passed an array of numbers, it will define a vibration pattern. Pass 0 to stop any vibration immediately.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
vibrate(time: number | Array<number>) {
|
||||
vibrate(time: number | number[]) {
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -19,12 +19,12 @@ export interface WheelSelectorOptions {
|
||||
/**
|
||||
* The items to display (array of items).
|
||||
*/
|
||||
items: Array<Array<WheelSelectorItem>>;
|
||||
items: WheelSelectorItem[][];
|
||||
|
||||
/**
|
||||
* Which items to display by default.
|
||||
*/
|
||||
defaultItems?: Array<DefaultItem>;
|
||||
defaultItems?: DefaultItem[];
|
||||
|
||||
/**
|
||||
* The 'ok' button text
|
||||
|
@ -8,8 +8,8 @@ export interface ZeroconfService {
|
||||
name: string;
|
||||
port: number;
|
||||
hostname: string;
|
||||
ipv4Addresses: Array<string>;
|
||||
ipv6Addresses: Array<string>;
|
||||
ipv4Addresses: string[];
|
||||
ipv6Addresses: string[];
|
||||
txtRecord: any;
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
"no-import-side-effect": false,
|
||||
"no-redundant-jsdoc": false,
|
||||
// TODO: Activate rules step by step
|
||||
"array-type": false,
|
||||
"ban-types": false,
|
||||
"no-shadowed-variable": false,
|
||||
"only-arrow-functions": false,
|
||||
|
Loading…
x
Reference in New Issue
Block a user