-
Notifications
You must be signed in to change notification settings - Fork 134
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
[Types] Make queryParams
strongly-typed
#101
Comments
If it's okay with you @ganigeorgiev, I can make those changes and open a PR. I can also merge the |
Hm, this was requested previously as part of #64. For now let's keep the scope of the issue minimal and not merge the We can add type for the query params but the declaration(s) needs to be a little more "relaxed" for better backward comparability and to allow setting also custom query props, eg. something like: export interface BaseQueryParams {
[key: string]: any;
expand?: string;
$autoCancel?: boolean;
$cancelKey?: string;
}
export interface ListQueryParams extends BaseQueryParams {
page?: number;
perPage?: number;
sort?: string;
filter?: string;
} @sewera If you don't have the time to work on this, I'll implement it sometime at the end of the week. |
I'll try to put together a PR with those changes by tomorrow. |
- make interfaces small and composable - fix typos in log messages and comments
@ganigeorgiev, please find PR #102 ready for review. |
The following types were added in master: BaseQueryParams
ListQueryParams
RecordQueryParams
RecordListQueryParams
LogStatsQueryParams
FileQueryParams They will be available with the v0.8.4 release sometime later this week. |
Right now, there are no types for
queryParams
; the default value is{}
, so any object will match this type.Some autocomplete will be nice, so I propose such alternative:
The text was updated successfully, but these errors were encountered: