David Sherret
David Sherret
@luker2 that's strange. It might be a webstorm issue. Another thing you can try is adding a separate declaration file (ex. `references.d.ts`) to your project and then reference the ts-nameof...
@luker2 ah yeah sorry I was misunderstanding the problem. I thought the type declaration wasn't working as well (I thought there was a compile error), but yes it seems like...
@patrykdawid I'm not sure how to get it to work. Maybe try https://github.com/nonara/ts-patch/ and patch the typescript package that angular is using?
@lundmikkel how are you compiling it? This is a compile time transformation so it needs to get injected into the compiler. Generally the instructions are: https://github.com/dsherret/ts-nameof/blob/master/packages/ts-nameof/setup/tsc.md (which sucks, but that's...
Hi @mzohreh, are you using grunt-ts? It doesn't seem to support custom transforms (but does seem to have its own transforms feature). What you could do is use the custom...
@PKnight-CheckWriters I updated the main post to show some examples.
Need to think about this more, but right now the only way to do it is to do: ``` `${nameof(Array)}` ``` The reason this isn't done by default is because...
No problem! Yeah, maybe something like `nameof.fullWithArgs()`? Ooops.. you're right. I messed up that example in other ways too. Should be: ```ts `${nameof()}` ```
@bretcope is correct that it can't be typed that way. There's not a way to inject functionality into type checking since transformations happen afterwards. For this you might just want...
@bzhu94 in your case: 1. Install `ts-nameof`, `@types/ts-nameof`, and `ttypescript` as dev dependencies. 2. Set the `TS_NODE_COMPILER` environment variable to `ttypescript` when running your script. For example, I think you...