When using a function such as `doSomethingByName ( name: keyof(State), value: string ): void { this.state[name] = value }` With nameof you get a compile time error indicating that the type doesn't match. While we could add a cast to the call like `nameof<State>(o => o.type) as keyof(State)` I was wondering if we could have the return type of nameof be keyof(T) instead for all of the nameof operations that use the generic form. This would allow us to remove the cast and just call `doSomethingByName(nameof<State>(o => o.type), 'myNewValue')`
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by VagabondOfHell and has received 5 comments.