mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-10 10:58:20 -05:00
Fix declaration emitter scoping issue for type parameter constraints
This commit is contained in:
@@ -1309,6 +1309,9 @@ namespace ts {
|
||||
}
|
||||
|
||||
function emitSignatureDeclaration(node: SignatureDeclaration) {
|
||||
const prevEnclosingDeclaration = enclosingDeclaration;
|
||||
enclosingDeclaration = node;
|
||||
|
||||
// Construct signature or constructor type write new Signature
|
||||
if (node.kind === SyntaxKind.ConstructSignature || node.kind === SyntaxKind.ConstructorType) {
|
||||
write("new ");
|
||||
@@ -1321,9 +1324,6 @@ namespace ts {
|
||||
write("(");
|
||||
}
|
||||
|
||||
const prevEnclosingDeclaration = enclosingDeclaration;
|
||||
enclosingDeclaration = node;
|
||||
|
||||
// Parameters
|
||||
emitCommaList(node.parameters, emitParameterDeclaration);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user