|
| 1 | +=== tests/cases/conformance/salsa/constructorFunctionMethodTypeParameters.js === |
| 2 | +/** |
| 3 | + * @template {string} T |
| 4 | + * @param {T} t |
| 5 | + */ |
| 6 | +function Cls(t) { |
| 7 | +>Cls : Symbol(Cls, Decl(constructorFunctionMethodTypeParameters.js, 0, 0)) |
| 8 | +>t : Symbol(t, Decl(constructorFunctionMethodTypeParameters.js, 4, 13)) |
| 9 | + |
| 10 | + this.t = t; |
| 11 | +>this.t : Symbol(Cls.t, Decl(constructorFunctionMethodTypeParameters.js, 4, 17)) |
| 12 | +>this : Symbol(Cls, Decl(constructorFunctionMethodTypeParameters.js, 0, 0)) |
| 13 | +>t : Symbol(Cls.t, Decl(constructorFunctionMethodTypeParameters.js, 4, 17)) |
| 14 | +>t : Symbol(t, Decl(constructorFunctionMethodTypeParameters.js, 4, 13)) |
| 15 | +} |
| 16 | + |
| 17 | +/** |
| 18 | + * @template {string} V |
| 19 | + * @param {T} t |
| 20 | + * @param {V} v |
| 21 | + * @return {V} |
| 22 | + */ |
| 23 | +Cls.prototype.topLevelComment = function (t, v) { |
| 24 | +>Cls.prototype : Symbol(Cls.topLevelComment, Decl(constructorFunctionMethodTypeParameters.js, 6, 1)) |
| 25 | +>Cls : Symbol(Cls, Decl(constructorFunctionMethodTypeParameters.js, 0, 0)) |
| 26 | +>prototype : Symbol(Function.prototype, Decl(lib.es5.d.ts, --, --)) |
| 27 | +>topLevelComment : Symbol(Cls.topLevelComment, Decl(constructorFunctionMethodTypeParameters.js, 6, 1)) |
| 28 | +>t : Symbol(t, Decl(constructorFunctionMethodTypeParameters.js, 14, 42)) |
| 29 | +>v : Symbol(v, Decl(constructorFunctionMethodTypeParameters.js, 14, 44)) |
| 30 | + |
| 31 | + return v |
| 32 | +>v : Symbol(v, Decl(constructorFunctionMethodTypeParameters.js, 14, 44)) |
| 33 | + |
| 34 | +}; |
| 35 | + |
| 36 | +Cls.prototype.nestedComment = |
| 37 | +>Cls.prototype : Symbol(Cls.nestedComment, Decl(constructorFunctionMethodTypeParameters.js, 16, 2)) |
| 38 | +>Cls : Symbol(Cls, Decl(constructorFunctionMethodTypeParameters.js, 0, 0)) |
| 39 | +>prototype : Symbol(Function.prototype, Decl(lib.es5.d.ts, --, --)) |
| 40 | +>nestedComment : Symbol(Cls.nestedComment, Decl(constructorFunctionMethodTypeParameters.js, 16, 2)) |
| 41 | + |
| 42 | + /** |
| 43 | + * @template {string} U |
| 44 | + * @param {T} t |
| 45 | + * @param {U} u |
| 46 | + * @return {T} |
| 47 | + */ |
| 48 | + function (t, u) { |
| 49 | +>t : Symbol(t, Decl(constructorFunctionMethodTypeParameters.js, 25, 14)) |
| 50 | +>u : Symbol(u, Decl(constructorFunctionMethodTypeParameters.js, 25, 16)) |
| 51 | + |
| 52 | + return t |
| 53 | +>t : Symbol(t, Decl(constructorFunctionMethodTypeParameters.js, 25, 14)) |
| 54 | + |
| 55 | + }; |
| 56 | + |
| 57 | +var c = new Cls('a'); |
| 58 | +>c : Symbol(c, Decl(constructorFunctionMethodTypeParameters.js, 29, 3)) |
| 59 | +>Cls : Symbol(Cls, Decl(constructorFunctionMethodTypeParameters.js, 0, 0)) |
| 60 | + |
| 61 | +const s = c.topLevelComment('a', 'b'); |
| 62 | +>s : Symbol(s, Decl(constructorFunctionMethodTypeParameters.js, 30, 5)) |
| 63 | +>c.topLevelComment : Symbol(Cls.topLevelComment, Decl(constructorFunctionMethodTypeParameters.js, 6, 1)) |
| 64 | +>c : Symbol(c, Decl(constructorFunctionMethodTypeParameters.js, 29, 3)) |
| 65 | +>topLevelComment : Symbol(Cls.topLevelComment, Decl(constructorFunctionMethodTypeParameters.js, 6, 1)) |
| 66 | + |
| 67 | +const t = c.nestedComment('a', 'b'); |
| 68 | +>t : Symbol(t, Decl(constructorFunctionMethodTypeParameters.js, 31, 5)) |
| 69 | +>c.nestedComment : Symbol(Cls.nestedComment, Decl(constructorFunctionMethodTypeParameters.js, 16, 2)) |
| 70 | +>c : Symbol(c, Decl(constructorFunctionMethodTypeParameters.js, 29, 3)) |
| 71 | +>nestedComment : Symbol(Cls.nestedComment, Decl(constructorFunctionMethodTypeParameters.js, 16, 2)) |
| 72 | + |
| 73 | + |
0 commit comments