Skip to content
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

Extract resolveDataResults function. Add test #9

Merged
merged 6 commits into from Jan 31, 2020

Conversation

ufocoder
Copy link
Contributor

No description provided.

services/service.ts Outdated Show resolved Hide resolved
@@ -52,22 +52,57 @@ export function mapFailure<S = any, F = any, R = any>(
}

export type PromiseRemoteDataResultMap<T, F> = { [P in keyof T]: Promise<RemoteDataResult<T[P], F>> };
export type RemoteDataResultMap<T, F> = { [P in keyof T]: RemoteDataResult<T[P], F> };

function createKeysMapTransformer<K = any>(keys: Array<K>) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we use lodash, let's simplify it with return (values) => _.fromPairs(_.zip(keys, values))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I plan to get rid of lodash

@ir4y ir4y force-pushed the 5-refactoring-resolveServiceMap branch 2 times, most recently from 0edeec5 to 86d8ecd Compare January 31, 2020 09:45
@ir4y ir4y merged commit 6de5eb0 into beda-software:master Jan 31, 2020
@ufocoder ufocoder deleted the 5-refactoring-resolveServiceMap branch February 6, 2020 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants