ts-simple-nameof icon indicating copy to clipboard operation
ts-simple-nameof copied to clipboard

When a class extends another, an unexpected name is returned

Open JoeMeeks opened this issue 4 months ago • 1 comments

In this use case nameof(MediaPlayerComponent); where MediaPlayerComponent extends a class named ContentComponentBase, the result is "MediaPlayerComponent extends shared__WEBPACK_IMPORTED_MODULE_2__.ContentComponentBase". My workaround is to omit any spaces and following characters like so nameof(MediaPlayerComponent).substring(0, nameof(MediaPlayerComponent).indexOf(' ')): but it would be fantastic if this library did so automatically when the name includes a space or perhaps when the name includes ' extends'.

JoeMeeks avatar Nov 02 '24 00:11 JoeMeeks