-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
// @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: a.js
function A () {
this.x = 1
}
/** @param {number} n */
A.prototype.y = A.prototype.z = function (n) {
return n + this.x
}
var a = new A()Expected behavior:
a.y : (n: number) => number and a.z: (n: number) => number.
Actual behavior:
a.y : (n: any) => any and a.z: (n: any) => any.
Note that binding works fine; it's just jsdoc type lookup that is defeated by chained assignment. Chained assignment of statics breaks in the same way as prototype assignments.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue