We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
invertObject
1 parent ef7370e commit 4da1450Copy full SHA for 4da1450
scripts/error-codes/invertObject.js
@@ -3,19 +3,16 @@
3
*
4
* This source code is licensed under the MIT license found in the
5
* LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow
8
*/
9
'use strict';
10
11
-import type {ErrorMap} from './Types';
12
/**
13
* turns
14
* { 'MUCH ERROR': '0', 'SUCH WRONG': '1' }
15
* into
16
* { 0: 'MUCH ERROR', 1: 'SUCH WRONG' }
17
18
-function invertObject(targetObj /*: ErrorMap */) /*: ErrorMap */ {
+function invertObject(targetObj) {
19
const result /*: {[string]: string} */ = {};
20
const mapKeys = Object.keys(targetObj);
21
0 commit comments