Improve error message

This commit is contained in:
Anders Hejlsberg 2019-04-14 09:14:58 -07:00
parent f9a99a02a6
commit f623325d77
2 changed files with 2 additions and 2 deletions

View File

@ -15954,7 +15954,7 @@ namespace ts {
const block = <Block | ModuleBlock | SourceFile>findAncestor(node, isFunctionOrModuleBlock);
const sourceFile = getSourceFileOfNode(node);
const span = getSpanOfTokenAtPosition(sourceFile, block.statements.pos);
diagnostics.add(createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.The_containing_function_or_module_body_is_too_large_for_control_flow_analysis));
diagnostics.add(createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.The_containing_function_or_module_body_is_too_complex_for_control_flow_analysis));
}
function getFlowTypeOfReference(reference: Node, declaredType: Type, initialType = declaredType, flowContainer?: Node, couldBeUninitialized?: boolean) {

View File

@ -2044,7 +2044,7 @@
"category": "Error",
"code": 2562
},
"The containing function or module body is too large for control flow analysis.": {
"The containing function or module body is too complex for control flow analysis.": {
"category": "Error",
"code": 2563
},