import { NodePath } from '@babel/traverse'; import * as t from '@babel/types'; import { ModuleContext } from '@komaci/common-shared'; import { PrimingDiagnostic } from '../types'; /** * Checks whether a getter contains an unnamed function declaration (anonymous FunctionExpression or ArrowFunctionExpression), * as well named FunctionExpression, NodePaths in the AST. None of these are allowed for external components. * @param {NodePath | NodePath} path NodePath containing a * {FunctionExpression | ArrowFunctionExpression} to analyze * @returns PrimingDiagnostic of the FunctionExpression or ArrowFunctionExpression if the invariant is detected, or * undefined if none was found */ export declare function checkForFunctionExpression(path: NodePath | NodePath): PrimingDiagnostic | undefined; /** * Checks for the presence of an Anonymous Function Expression or ArrowFunctionExpression in the context of an external component * (where it is not allowed). * @param {ModuelContext} moduleContext which can tell if we are in the context of an external component or not * @param {NodePath | NodePath} path the NodePath of the FunctionExpression or * ArrowFunctionExpression to be evaluated * @returns PrimingDiagnostic if anonymous function expression is found in the context of an external component, or undefined if none was found * or if one was detected within the context of an internal component */ export declare function checkForFunctionExpressionIfExternalComponent(moduleContext: ModuleContext, path: NodePath | NodePath): PrimingDiagnostic | undefined; /** * Checks whether a getter contains an named function declaration NodePath (as an ObjectMethod) on the AST * @param {ModuelContext} moduleContext which can tell if we are in the context of an external component or not * @param {NodePath} path NodePath containing a {ObjectMethod} to analyze * @returns PrimingDiagnostic of the first ObjectMethod invariant encountered is detected, or undefined if none was found */ export declare function checkForObjectMethodFunctionDeclarations(moduleContext: ModuleContext, path: NodePath): PrimingDiagnostic | undefined; //# sourceMappingURL=functionExpressionInvariantFunctions.d.ts.map