Skip to content

Commit

Permalink
fix(MockPlural): removing generic type from MockComponents, Directive…
Browse files Browse the repository at this point in the history
…s, and Pipes
  • Loading branch information
ike18t committed Oct 2, 2018
1 parent 89db09c commit 919a06c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/mock-component/mock-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export type MockedComponent<T> = T & {
__simulateTouch(): void;
};

export function MockComponents<TComponent>(...components: Array<Type<TComponent>>): Array<Type<TComponent>> {
export function MockComponents(...components: Array<Type<any>>): Array<Type<any>> {
return components.map(MockComponent);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/mock-directive/mock-directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { directiveResolver } from '../common/reflect';

const cache = new Map<Type<Directive>, Type<Directive>>();

export function MockDirectives<TDirective>(...directives: Array<Type<TDirective>>): Array<Type<TDirective>> {
export function MockDirectives(...directives: Array<Type<any>>): Array<Type<any>> {
return directives.map(MockDirective);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/mock-pipe/mock-pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Pipe, PipeTransform, Type } from '@angular/core';
import { MockOf } from '../common';
import { pipeResolver } from '../common/reflect';

export function MockPipes<TPipe extends PipeTransform>(...pipes: Array<Type<TPipe>>): Array<Type<TPipe>> {
export function MockPipes(...pipes: Array<Type<PipeTransform>>): Array<Type<PipeTransform>> {
return pipes.map((pipe) => MockPipe(pipe, undefined));
}

Expand Down

0 comments on commit 919a06c

Please sign in to comment.