diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c14cc8fd757..663825f1e84 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8564,12 +8564,12 @@ namespace ts { case SyntaxKind.SetAccessor: // A method or accessor declaration decorator will have two or three arguments (see // `PropertyDecorator` and `MethodDecorator` in core.d.ts) - + // If we are emitting decorators for ES3, we will only pass two arguments. if (languageVersion === ScriptTarget.ES3) { return 2; } - + // If the method decorator signature only accepts a target and a key, we will only // type check those arguments. return signature.parameters.length >= 3 ? 3 : 2; diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index d0f888cfa02..7b74024aec4 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -301,7 +301,7 @@ namespace ts { sourceFile.fileWatcher.close(); sourceFile.fileWatcher = undefined; if (removed) { - var index = rootFileNames.indexOf(sourceFile.fileName); + let index = rootFileNames.indexOf(sourceFile.fileName); if (index >= 0) { rootFileNames.splice(index, 1); }