Skip to content

Commit

Permalink
chore(transformer): Narrow signatures of mock factory call routines
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjlowm committed May 9, 2020
1 parent 9d8360d commit 38a6b79
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/transformer/mockFactoryCall/mockFactoryCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import { MockIdentifierGenericParameter } from '../mockIdentifier/mockIdentifier
import { Scope } from '../scope/scope';
import { TypescriptCreator } from '../helper/creator';

export function GetMockFactoryCall(typeReferenceNode: ts.TypeReferenceNode, scope: Scope): ts.Expression {
export function GetMockFactoryCall(typeReferenceNode: ts.TypeReferenceNode, scope: Scope): ts.CallExpression {
const declaration: ts.Declaration = TypescriptHelper.GetDeclarationFromNode(typeReferenceNode.typeName);

return getDeclarationMockFactoryCall(declaration, typeReferenceNode, scope);
}

export function CreateMockFactory(typeReferenceNode: ts.TypeReferenceNode, scope: Scope): ts.Expression {
export function CreateMockFactory(typeReferenceNode: ts.TypeReferenceNode, scope: Scope): ts.CallExpression {
const declaration: ts.Declaration = TypescriptHelper.GetDeclarationFromNode(typeReferenceNode.typeName);
MockDefiner.instance.createMockFactory(declaration);

Expand Down Expand Up @@ -68,7 +68,7 @@ export function GetMockFactoryCallForThis(mockKey: string): ts.Expression {
);
}

function getDeclarationMockFactoryCall(declaration: ts.Declaration, typeReferenceNode: ts.TypeReferenceNode, scope: Scope): ts.Expression {
function getDeclarationMockFactoryCall(declaration: ts.Declaration, typeReferenceNode: ts.TypeReferenceNode, scope: Scope): ts.CallExpression {
const declarationKey: string | undefined = MockDefiner.instance.getDeclarationKeyMap(declaration);

if (!declarationKey) {
Expand Down

0 comments on commit 38a6b79

Please sign in to comment.