{"record":{"id":"cbaf9f4a2041e248","repo":"angular/angular","slug":"missing-declaration-for-return-value-from-helper","errorCode":null,"errorMessage":"Missing declaration for return value from helper.","messagePattern":"Missing declaration for return value from helper\\.","errorType":"exception","errorClass":"BabelParseError","httpStatus":null,"severity":"error","filePath":"packages/localize/tools/src/source_file_utils.ts","lineNumber":339,"sourceCode":"  }\n  const lazyLoadFn = lazyLoadBinding.path;\n  if (!lazyLoadFn.isFunctionDeclaration()) {\n    throw new BabelParseError(\n      lazyLoadFn.node,\n      'Unexpected expression (expected a function declaration',\n    );\n  }\n  const returnedNode = getReturnedExpression(lazyLoadFn);\n\n  if (returnedNode.isCallExpression()) {\n    return returnedNode;\n  }\n\n  if (returnedNode.isIdentifier()) {\n    const identifierName = returnedNode.node.name;\n    const declaration = returnedNode.scope.getBinding(identifierName);\n    if (declaration === undefined) {\n      throw new BabelParseError(\n        returnedNode.node,\n        'Missing declaration for return value from helper.',\n      );\n    }\n    if (!declaration.path.isVariableDeclarator()) {\n      throw new BabelParseError(\n        declaration.path.node,\n        'Unexpected helper return value declaration (expected a variable declaration).',\n      );\n    }\n    const initializer = declaration.path.get('init');\n    if (!initializer.isCallExpression()) {\n      throw new BabelParseError(\n        declaration.path.node,\n        'Unexpected return value from helper (expected a call expression).',\n      );\n    }\n","sourceCodeStart":321,"sourceCodeEnd":357,"githubUrl":"https://github.com/angular/angular/blob/51cb07e98081ab7e4e84a9e0949266a8e19cca84/packages/localize/tools/src/source_file_utils.ts#L321-L357","documentation":"Error \"Missing declaration for return value from helper.\" thrown in angular/angular.","triggerScenarios":"Thrown at packages/localize/tools/src/source_file_utils.ts:339 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The helper function is missing its return statement declaration; keep the generated helper code intact."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"51cb07e98081ab7e4e84a9e0949266a8e19cca84","analyzedAt":"2026-08-22T07:04:54.531Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}