nameof-ts5.macro
v0.0.3
Published
Babel macro for nameof in TypeScript.
Downloads
4
Maintainers
Readme
nameof-ts5.macro
Setup
- Install dependencies:
npm install --save-dev babel-plugin-macros nameof-ts5.macro
Ensure
babel-plugin-macros
is properly setup (Instructions).Import and use the default export. For example:
import nameof from "nameof-ts5.macro";
nameof(window.alert);
Transforms to:
"alert";