UNPKG

658 BTypeScriptView Raw
1/**
2 * Allows extraction of a minified key. Let's the build system minify keys
3 * without losing the ability to dynamically use key strings as values
4 * themselves. Pass in an object with a single key/val pair and it will return
5 * you the string key of that single record. Suppose you want to grab the
6 * value for a key 'className' inside of an object. Key/val minification may
7 * have aliased that key to be 'xa12'. keyOf({className: null}) will return
8 * 'xa12' in that case. Resolve keys you want to use once at startup time, then
9 * reuse those resolutions.
10 */
11declare function keyOf(oneKeyObj: any): any;
12
13declare namespace keyOf {}
14
15export = keyOf;