Skip to content

Commit

Permalink
fix(healt): add correct return type for query function (#2565)
Browse files Browse the repository at this point in the history
* update query return type

query is always returning an array

* refactor
  • Loading branch information
Adrian Savin authored and danielsogl committed Jun 25, 2018
1 parent 8d57198 commit 98d44e6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/@ionic-native/plugins/health/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export class Health extends IonicNativePlugin {
* been given at some point in the past.
*
* Quirks of requestAuthorization()
*
* In Android, it will try to get authorization from the Google Fit APIs.
* It is necessary that the app's package name and the signing key are registered in the Google API console.
* In Android, be aware that if the activity is destroyed (e.g. after a rotation) or is put in background,
Expand Down Expand Up @@ -298,11 +298,11 @@ export class Health extends IonicNativePlugin {
* nutrition.vitamin_a is given in micrograms in HealthKit and International Unit in Google Fit.
* Automatic conversion is not trivial and depends on the actual substance.
*
* @param queryOptions {HealthQueryOptions}
* @return {Promise<HealthData>}
* @param {HealthQueryOptions} queryOptions
* @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.
Expand All @@ -322,7 +322,7 @@ export class Health extends IonicNativePlugin {
* To be sure to get all the stored quantities, it's better to query single nutrients.
* nutrition.vitamin_a is given in micrograms in HealthKit and International Unit in Google Fit.
*
* @param queryOptionsAggregated {HealthQueryOptionsAggregated}
* @param {HealthQueryOptionsAggregated} queryOptionsAggregated
* @return {Promise<HealthData[]>}
*/
@Cordova()
Expand Down

0 comments on commit 98d44e6

Please sign in to comment.