Skip to content

Commit

Permalink
feat(core/transform): renames asImplementation and asDeclaration to t…
Browse files Browse the repository at this point in the history
…oImplementation and toDeclaration
  • Loading branch information
rafamel committed Oct 18, 2019
1 parent 186d38e commit f697ba9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/transform/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './replace';
export * from './normalize';
export * from './as';
export * from './route';
export * from './to';
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { CollectionTree, CollectionTreeImplementation, Service } from '~/types';
import { replace } from './replace';
import { isElementService, isServiceImplementation } from '~/inspect';

export function asImplementation<T extends CollectionTree>(
export function toImplementation<T extends CollectionTree>(
collection: T,
fn: (service: Service, data: { path: string[]; route: string[] }) => Service
): T & CollectionTreeImplementation {
Expand All @@ -12,7 +12,7 @@ export function asImplementation<T extends CollectionTree>(
}) as T & CollectionTreeImplementation;
}

export function asDeclaration(collection: CollectionTree): CollectionTree {
export function toDeclaration(collection: CollectionTree): CollectionTree {
return replace(collection, (element, next) => {
element = next(element);

Expand Down

0 comments on commit f697ba9

Please sign in to comment.