@@ -7,8 +7,12 @@ import { Scope } from '../../scope/scope';
77import { ResolveSignatureElseBranch } from '../helper/branching' ;
88import { TypescriptHelper } from '../helper/helper' ;
99
10- export function GetMethodDescriptor ( _propertyName : ts . PropertyName , methodSignatures : MethodSignature [ ] , scope : Scope ) : ts . CallExpression {
10+ export function GetMethodDescriptor ( propertyName : ts . PropertyName , methodSignatures : MethodSignature [ ] , scope : Scope ) : ts . CallExpression {
1111 const providerGetMethod : ts . PropertyAccessExpression = CreateProviderGetMethod ( ) ;
12+
13+ const propertyNameString : string = TypescriptHelper . GetStringPropertyName ( propertyName ) ;
14+ const propertyNameStringLiteral : ts . StringLiteral = ts . createStringLiteral ( propertyNameString ) ;
15+
1216 const transformOverloadsOption : TsAutoMockOverloadOptions = GetTsAutoMockOverloadOptions ( ) ;
1317
1418 const signatures : MethodSignature [ ] = methodSignatures . filter ( ( _ : unknown , notFirst : number ) => transformOverloadsOption || ! notFirst ) ;
@@ -67,11 +71,7 @@ export function GetMethodDescriptor(_propertyName: ts.PropertyName, methodSignat
6771 signatureWithMostParameters . parameters ,
6872 ) ;
6973
70- const propName : ts . StringLiteral = ts . createStringLiteral (
71- TypescriptCreator . createSignatureHash ( methodSignatures ) ,
72- ) ;
73-
74- return TypescriptCreator . createCall ( providerGetMethod , [ propName , propertyValueFunction ] ) ;
74+ return TypescriptCreator . createCall ( providerGetMethod , [ propertyNameStringLiteral , propertyValueFunction ] ) ;
7575}
7676
7777function CreateProviderGetMethod ( ) : ts . PropertyAccessExpression {
0 commit comments