diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 2aeab800f0f..957b519af5e 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -188,6 +188,9 @@ namespace ts { verifyCompilerOptions(); + // unconditionally set oldProgram to undefined to prevent it from being captured in closure + oldProgram = undefined; + programTime += new Date().getTime() - start; program = {