66 * @property {string=} y
77 * @property {string} [z]
88 * @property {string} [w="hi"]
9- *
9+ *
1010 * @param {Opts} opts
1111 */
12- function foo(opts) {}
12+ function foo(opts) {
1313>foo : Symbol(foo, Decl(0.js, 0, 0))
1414>opts : Symbol(opts, Decl(0.js, 10, 13))
1515
16+ opts.x;
17+ >opts.x : Symbol(x, Decl(0.js, 3, 3))
18+ >opts : Symbol(opts, Decl(0.js, 10, 13))
19+ >x : Symbol(x, Decl(0.js, 3, 3))
20+ }
21+
1622foo({x: 'abc'});
1723>foo : Symbol(foo, Decl(0.js, 0, 0))
18- >x : Symbol(x, Decl(0.js, 12 , 5))
24+ >x : Symbol(x, Decl(0.js, 14 , 5))
1925
2026/**
2127 * @typedef {Object} AnotherOpts
@@ -24,11 +30,39 @@ foo({x: 'abc'});
2430 *
2531 * @param {AnotherOpts} opts
2632 */
27- function foo1(opts) {}
28- >foo1 : Symbol(foo1, Decl(0.js, 12, 16))
29- >opts : Symbol(opts, Decl(0.js, 21, 14))
33+ function foo1(opts) {
34+ >foo1 : Symbol(foo1, Decl(0.js, 14, 16))
35+ >opts : Symbol(opts, Decl(0.js, 23, 14))
36+
37+ opts.anotherX;
38+ >opts.anotherX : Symbol(anotherX, Decl(0.js, 18, 3))
39+ >opts : Symbol(opts, Decl(0.js, 23, 14))
40+ >anotherX : Symbol(anotherX, Decl(0.js, 18, 3))
41+ }
3042
3143foo1({anotherX: "world"});
32- >foo1 : Symbol(foo1, Decl(0.js, 12, 16))
33- >anotherX : Symbol(anotherX, Decl(0.js, 23, 6))
44+ >foo1 : Symbol(foo1, Decl(0.js, 14, 16))
45+ >anotherX : Symbol(anotherX, Decl(0.js, 27, 6))
46+
47+ /**
48+ * @typedef {object} Opts1
49+ * @property {string} x
50+ * @property {string=} y
51+ * @property {string} [z]
52+ * @property {string} [w="hi"]
53+ *
54+ * @param {Opts1} opts
55+ */
56+ function foo2(opts) {
57+ >foo2 : Symbol(foo2, Decl(0.js, 27, 26))
58+ >opts : Symbol(opts, Decl(0.js, 38, 14))
59+
60+ opts.x;
61+ >opts.x : Symbol(x, Decl(0.js, 31, 3))
62+ >opts : Symbol(opts, Decl(0.js, 38, 14))
63+ >x : Symbol(x, Decl(0.js, 31, 3))
64+ }
65+ foo2({x: 'abc'});
66+ >foo2 : Symbol(foo2, Decl(0.js, 27, 26))
67+ >x : Symbol(x, Decl(0.js, 41, 6))
3468
0 commit comments