Closed john-larson closed 4 years ago
How are you using the library and which installation instructions did you follow? Make sure it’s a dev dependency... it’s a compile time transformation so it shouldn’t be used in any code at runtime.
I thought this was a run-time library. So, after making this configuration in Webpack.config, how should I use it in TypeScript without importing? Should I declare it as any
in some part of my code?
Install @types/ts-nameof
as well:
npm install ts-nameof @types/ts-nameof --save-dev
(Step 2: https://github.com/dsherret/ts-nameof/tree/master/packages/ts-nameof#setup)
Then you'll just be able to use nameof(something)
I'll have to add something more clear to the main readme.md file.
Thanks for the prompt help :thumbsup:
I am trying to use this library in a single page web application on the browser using Webpack. I installed the library via NPM. And I get the following error:
I do not know much about this module but a quick Google search seems to imply that it is a Node specific module. Is this library Node specific?