File: checkJsObjectLiteralIndexSignatures.js

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (23 lines) | stat: -rw-r--r-- 424 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//// [file.js]
// @ts-check

let n = Math.random();
let s = `${n}`;

const numericIndex = { [n]: 1 };
numericIndex[n].toFixed();

const stringIndex = { [s]: 1 };
stringIndex[s].toFixed();



//// [file.js]
// @ts-check
var _a, _b;
var n = Math.random();
var s = "" + n;
var numericIndex = (_a = {}, _a[n] = 1, _a);
numericIndex[n].toFixed();
var stringIndex = (_b = {}, _b[s] = 1, _b);
stringIndex[s].toFixed();