From 4cd7f079e3f1e1aac59c424d8090baefdfe2f1cb Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Wed, 15 Jul 2015 16:43:13 -0700 Subject: [PATCH] Move startIndex declaration to the top --- src/compiler/emitter.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 7b083ba7363..9c8438565e7 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -4215,13 +4215,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } + let startIndex = 0; + write(" {"); scopeEmitStart(node, "constructor"); increaseIndent(); if (ctor) { // Emit all the directive prologues (like "use strict"). These have to come before // any other preamble code we write (like parameter initializers). - var startIndex = emitDirectivePrologues(ctor.body.statements, /*startWithNewLine*/ true); + startIndex = emitDirectivePrologues(ctor.body.statements, /*startWithNewLine*/ true); emitDetachedComments(ctor.body.statements); } emitCaptureThisForNodeIfNecessary(node);