refactor: follow array-type lint rule

This commit is contained in:
Daniel
2018-09-17 16:05:37 +02:00
parent 60a7190eda
commit c9d41ebd8a
31 changed files with 115 additions and 114 deletions
+10 -8
View File
@@ -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;
}
}