mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 15:25:54 -06:00
Improve error message
This commit is contained in:
parent
f9a99a02a6
commit
f623325d77
@ -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) {
|
||||
|
||||
@ -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
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user