-
Notifications
You must be signed in to change notification settings - Fork 20
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
Refactors watt-time model #37
Conversation
|
||
import {ERRORS} from '../../util/errors'; | ||
import {buildErrorMessage} from '../../util/helpers'; | ||
|
||
import {KeyValuePair, ModelParams} from '../../types/common'; | ||
import {ModelPluginInterface} from '../../interfaces'; | ||
import {WattTimeAPI} from './watt-time-api'; | ||
import {validate} from '../../util/validations'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please separate util, api imports from types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for noticing
src/lib/watt-time/watt-time-api.ts
Outdated
* Sorts the data based on the 'point_time' property in ascending order. | ||
*/ | ||
private sortData(data: object[]) { | ||
return data.sort((a: any, b: any) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please cover a and b with types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Types of changes
A description of the changes proposed in the Pull Request