From 7fa447b56fc67d3d95edc8cc195afad8804ddb10 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sun, 4 Nov 2018 22:10:21 +0900 Subject: [PATCH] strict types --- src/services/formatting/smartIndenter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts index c5ab3e6ec03..d5180c87874 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -69,7 +69,7 @@ namespace ts.formatting { const containerList = getListByPosition(position, precedingToken.parent); // use list position if the preceding token is before any list items if (containerList && !rangeContainsRange(containerList, precedingToken)) { - return getActualIndentationForListStartLine(containerList, sourceFile, options) + options.indentSize; + return getActualIndentationForListStartLine(containerList, sourceFile, options) + options.indentSize!; // TODO: GH#18217 } return getSmartIndent(sourceFile, position, precedingToken, lineAtPosition, assumeNewLineBeforeCloseBrace, options); @@ -422,7 +422,7 @@ namespace ts.formatting { return result; } } - return getActualIndentationForListStartLine(containingList, sourceFile, options) + (listIndentsChild ? options.indentSize : 0); + return getActualIndentationForListStartLine(containingList, sourceFile, options) + (listIndentsChild ? options.indentSize! : 0); // TODO: GH#18217 } return Value.Unknown; }