Fix declaration emitter scoping issue for type parameter constraints
This commit is contained in:
parent
3055445d27
commit
5ab5338574
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue