diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 7a2ec512e5a..07a81967661 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3157,7 +3157,7 @@ namespace ts { // Return the type implied by an object binding pattern function getTypeFromObjectBindingPattern(pattern: ObjectBindingPattern, includePatternInType: boolean, reportErrors: boolean): ResolvedType { const members = createMap(); - let hasComputedProperties: boolean; + let hasComputedProperties = false; forEach(pattern.elements, e => { const name = e.propertyName || e.name; if (isComputedNonLiteralName(name)) { @@ -10274,7 +10274,7 @@ namespace ts { const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === SyntaxKind.ObjectBindingPattern || contextualType.pattern.kind === SyntaxKind.ObjectLiteralExpression); let typeFlags: TypeFlags = 0; - let patternWithComputedProperties: boolean | undefined; + let patternWithComputedProperties = false; let hasComputedStringProperty = false; let hasComputedNumberProperty = false;