dsherret / ts-nameof

nameof in TypeScript
MIT License
492 stars 23 forks source link

[Question] Can I use ts-nameof with generic type parameters ? #103

Closed remus-corneliu closed 4 years ago

remus-corneliu commented 4 years ago

Assuming that I have a generic service. Can I get the actual type name being passed as type parameter?

` service(): string { return nameof() }

interface IService { }

service() /// should return IService `

Currently I see that the output is 'TInterface'