Problem: Someone may have overriden the behaviour of prototype methods like Array.prototype.join.
Response: If someone is changing the behaviour of these prototype methods then that is their problem.
Workaround: const array = nameof.split<IState>(state => state.a.b.c); const result = array.join("/");?
From https://github.com/dsherret/ts-nameof/issues/42#issuecomment-455343611
It might be nice to inspect if certain property access expressions on the result of nameof calls could be resolved at compile time if able:
Compiles to:
Problem: Someone may have overriden the behaviour of prototype methods like
Array.prototype.join
. Response: If someone is changing the behaviour of these prototype methods then that is their problem. Workaround:const array = nameof.split<IState>(state => state.a.b.c); const result = array.join("/");
?