You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error TS2769 (TS) No overload matches this call.
Overload 1 of 2, '(selector: (obj: Object) => any, options?: NameofOptions): string', gave the following error.
Argument of type 'typeof TicketPriorityEnum' is not assignable to parameter of type '(obj: Object) => any'.
Type 'typeof TicketPriorityEnum' provides no match for the signature '(obj: Object): any'.
Overload 2 of 2, '(classType: new (...params: any[]) => Object): string', gave the following error.
Argument of type 'typeof TicketPriorityEnum' is not assignable to parameter of type 'new (...params: any[]) => Object'.
Type 'typeof TicketPriorityEnum' provides no match for the signature 'new (...params: any[]): Object'.
I guess enums are not supported. Are they?
The text was updated successfully, but these errors were encountered:
Sorry I took so long to reply to this. It fell off my radar.
Enums are indeed not supported and, as this lib's nameof is a runtime function, there would be no way to support them. Since all it does is call toString on the class or function passed in, calling toString on an enum yields [object Object], which yields no information about its name, which is really just a variable name as far as JS is concerned.
Got the following code:
And the following error:
I guess enums are not supported. Are they?
The text was updated successfully, but these errors were encountered: