1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
=== tests/cases/conformance/salsa/usage.js ===
const x = require("./lateBoundAssignmentDeclarationSupport1.js");
>x : typeof x
>require("./lateBoundAssignmentDeclarationSupport1.js") : typeof x
>require : any
>"./lateBoundAssignmentDeclarationSupport1.js" : "./lateBoundAssignmentDeclarationSupport1.js"
const y = x["my-fake-sym"];
>y : any
>x["my-fake-sym"] : any
>x : typeof x
>"my-fake-sym" : "my-fake-sym"
const z = x[x.S];
>z : any
>x[x.S] : any
>x : typeof x
>x.S : unique symbol
>x : typeof x
>S : unique symbol
=== tests/cases/conformance/salsa/lateBoundAssignmentDeclarationSupport1.js ===
// currently unsupported
const _sym = Symbol();
>_sym : unique symbol
>Symbol() : unique symbol
>Symbol : SymbolConstructor
const _str = "my-fake-sym";
>_str : "my-fake-sym"
>"my-fake-sym" : "my-fake-sym"
exports[_sym] = "ok";
>exports[_sym] = "ok" : "ok"
>exports[_sym] : any
>exports : typeof import("tests/cases/conformance/salsa/lateBoundAssignmentDeclarationSupport1")
>_sym : unique symbol
>"ok" : "ok"
exports[_str] = "ok";
>exports[_str] = "ok" : "ok"
>exports[_str] : any
>exports : typeof import("tests/cases/conformance/salsa/lateBoundAssignmentDeclarationSupport1")
>_str : "my-fake-sym"
>"ok" : "ok"
exports.S = _sym;
>exports.S = _sym : unique symbol
>exports.S : unique symbol
>exports : typeof import("tests/cases/conformance/salsa/lateBoundAssignmentDeclarationSupport1")
>S : unique symbol
>_sym : unique symbol
|