File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8156,23 +8156,12 @@ namespace ts {
81568156 return type;
81578157 }
81588158 const declaration = localOrExportSymbol.valueDeclaration;
8159- <<<<<<< HEAD
8160- const defaultsToDeclaredType = !strictNullChecks || type.flags & TypeFlags.Any || !declaration ||
8161- declaration.kind === SyntaxKind.Parameter || isInAmbientContext(declaration) ||
8162- getContainingFunctionOrModule(declaration) !== getContainingFunctionOrModule(node);
8163- if (defaultsToDeclaredType && type.flags & TypeFlags.NotNarrowable) {
8164- return type;
8165- }
8166- const flowType = getFlowTypeOfReference(node, type, defaultsToDeclaredType ? type : undefinedType);
8167- if (strictNullChecks && !(type.flags & TypeFlags.Any) && !(getNullableKind(type) & TypeFlags.Undefined) && getNullableKind(flowType) & TypeFlags.Undefined) {
8168- =======
81698159 const includeOuterFunctions = isReadonlySymbol(localOrExportSymbol);
81708160 const assumeInitialized = !strictNullChecks || (type.flags & TypeFlags.Any) !== 0 || !declaration ||
81718161 getRootDeclaration(declaration).kind === SyntaxKind.Parameter || isInAmbientContext(declaration) ||
81728162 !isDeclarationIncludedInFlow(node, declaration, includeOuterFunctions);
81738163 const flowType = getFlowTypeOfReference(node, type, assumeInitialized, includeOuterFunctions);
81748164 if (!assumeInitialized && !(getNullableKind(type) & TypeFlags.Undefined) && getNullableKind(flowType) & TypeFlags.Undefined) {
8175- >>>>>>> master
81768165 error(node, Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol));
81778166 // Return the declared type to reduce follow-on errors
81788167 return type;
You can’t perform that action at this time.
0 commit comments