File tree Expand file tree Collapse file tree 1 file changed +0
-11
lines changed Expand file tree Collapse file tree 1 file changed +0
-11
lines changed Original file line number Diff line number Diff line change @@ -8156,23 +8156,12 @@ namespace ts {
8156
8156
return type;
8157
8157
}
8158
8158
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
- =======
8169
8159
const includeOuterFunctions = isReadonlySymbol(localOrExportSymbol);
8170
8160
const assumeInitialized = !strictNullChecks || (type.flags & TypeFlags.Any) !== 0 || !declaration ||
8171
8161
getRootDeclaration(declaration).kind === SyntaxKind.Parameter || isInAmbientContext(declaration) ||
8172
8162
!isDeclarationIncludedInFlow(node, declaration, includeOuterFunctions);
8173
8163
const flowType = getFlowTypeOfReference(node, type, assumeInitialized, includeOuterFunctions);
8174
8164
if (!assumeInitialized && !(getNullableKind(type) & TypeFlags.Undefined) && getNullableKind(flowType) & TypeFlags.Undefined) {
8175
- >>>>>>> master
8176
8165
error(node, Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol));
8177
8166
// Return the declared type to reduce follow-on errors
8178
8167
return type;
You can’t perform that action at this time.
0 commit comments