mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 20:33:45 -05:00
Fix type reference to merged prototype property assignment (#34764)
The constructor function code path in the return type checking of signatures needs to pass the *merged* symbol of the declaration to getDeclaredTypeOfClassOrInterface. Other callers of getDeclaredTypeOfClassOrInterface do this, or used an already-merged symbol. Fixes #33993
This commit is contained in:
committed by
GitHub
parent
eb0208c589
commit
080e41dc90
@@ -0,0 +1,14 @@
|
||||
// https://github.com/microsoft/TypeScript/issues/33993
|
||||
// @noEmit: true
|
||||
// @allowJs: true
|
||||
// @checkJS: true
|
||||
// @filename: prototypePropertyAssignmentMergedTypeReference.js
|
||||
var f = function() {
|
||||
return 12;
|
||||
};
|
||||
|
||||
f.prototype.a = "a";
|
||||
|
||||
/** @type {new () => f} */
|
||||
var x = f;
|
||||
|
||||
Reference in New Issue
Block a user