UNPKG

ts-nameof

Version:
47 lines (31 loc) 1.83 kB
ts-nameof ========== [![npm version](https://badge.fury.io/js/ts-nameof.svg)](https://badge.fury.io/js/ts-nameof) [![Build Status](https://travis-ci.org/dsherret/ts-nameof.svg)](https://travis-ci.org/dsherret/ts-nameof) [![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges) [`nameof`](https://msdn.microsoft.com/en-us/library/dn986596.aspx) in TypeScript. ``` npm install ts-nameof @types/ts-nameof --save-dev ``` ## Setup ### 1. Build Setup Follow any of these instructions: * [Webpack](https://github.com/dsherret/ts-nameof/blob/master/packages/ts-nameof/setup/webpack.md) * [Gulp](https://github.com/dsherret/ts-nameof/blob/master/packages/ts-nameof/setup/gulp.md) * [FuseBox](https://github.com/dsherret/ts-nameof/blob/master/packages/ts-nameof/setup/fusebox.md) * [tsc](https://github.com/dsherret/ts-nameof/blob/master/packages/ts-nameof/setup/tsc.md) * [Jest](https://github.com/dsherret/ts-nameof/blob/master/packages/ts-nameof/setup/jest.md) * [Custom](https://github.com/dsherret/ts-nameof/blob/master/packages/ts-nameof/setup/custom.md) * Others - Open an [issue](https://github.com/dsherret/ts-nameof/issues). These instructions need updating to use the transformation API, but will still work in the meantime: * Nuxt - Use [https://github.com/Kukks/nuxt-ts-nameof](https://github.com/Kukks/nuxt-ts-nameof#readme) ### 2. Declaring global `nameof` function Install `@types/ts-nameof`: ``` npm install @types/ts-nameof --save-dev ``` ## Transforms [Read here](https://github.com/dsherret/ts-nameof/blob/master/README.md) ## Other * [Contributing](https://github.com/dsherret/ts-nameof/blob/master/CONTRIBUTING.md) * [Development](https://github.com/dsherret/ts-nameof/blob/master/DEVELOPMENT.md)