@@ -177,10 +177,10 @@ export function disable() {
177
177
}
178
178
179
179
function profileFunction < F extends Function > ( fn : F , customName ?: string ) : F {
180
- return profileFunctionFactory ( fn , customName || fn . name ) ;
180
+ return profileFunctionFactory < F > ( fn , customName || fn . name ) ;
181
181
}
182
182
183
- const profileMethodUnnamed = ( target , key , descriptor ) => {
183
+ const profileMethodUnnamed = ( target : Object , key : symbol | string , descriptor ) => {
184
184
// save a reference to the original method this way we keep the values currently in the
185
185
// descriptor and don't overwrite what another decorator might have done to the descriptor.
186
186
if ( descriptor === undefined ) {
@@ -193,7 +193,7 @@ const profileMethodUnnamed = (target, key, descriptor) => {
193
193
className = target . constructor . name + '.' ;
194
194
}
195
195
196
- const name = className + key ;
196
+ const name = className + key ?. toString ( ) ;
197
197
198
198
//editing the descriptor/value parameter
199
199
descriptor . value = profileFunctionFactory ( originalMethod , name , MemberType . Instance ) ;
@@ -202,7 +202,7 @@ const profileMethodUnnamed = (target, key, descriptor) => {
202
202
return descriptor ;
203
203
} ;
204
204
205
- const profileStaticMethodUnnamed = ( ctor , key , descriptor ) => {
205
+ const profileStaticMethodUnnamed = < F extends Function > ( ctor : F , key : symbol | string , descriptor ) => {
206
206
// save a reference to the original method this way we keep the values currently in the
207
207
// descriptor and don't overwrite what another decorator might have done to the descriptor.
208
208
if ( descriptor === undefined ) {
@@ -214,7 +214,7 @@ const profileStaticMethodUnnamed = (ctor, key, descriptor) => {
214
214
if ( ctor && ctor . name ) {
215
215
className = ctor . name + '.' ;
216
216
}
217
- const name = className + key ;
217
+ const name = className + key ?. toString ( ) ;
218
218
219
219
//editing the descriptor/value parameter
220
220
descriptor . value = profileFunctionFactory ( originalMethod , name , MemberType . Static ) ;
0 commit comments