Skip to content

Commit

Permalink
fix(core/transform): toImplementation callback must return a ServiceI…
Browse files Browse the repository at this point in the history
…mplementation
  • Loading branch information
rafamel committed Oct 24, 2019
1 parent 379bc11 commit 104dc26
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/core/src/transform/to.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import {
QueryService,
MutationService,
SubscriptionService,
ElementInfo
ElementInfo,
ServiceImplementation
} from '~/types';
import { replace } from './replace';
import {
Expand All @@ -19,7 +20,7 @@ import { take } from 'rxjs/operators';

export function toImplementation<T extends CollectionTree>(
collection: T,
fn: (service: Service, info: ElementInfo) => Service
fn: (service: Service, info: ElementInfo) => ServiceImplementation
): T & CollectionTreeImplementation {
return replace(collection, (element, info, next) => {
element = next(element);
Expand Down

0 comments on commit 104dc26

Please sign in to comment.