import { KomaciDocument } from '@komaci/types'; import type { ChildNode } from '@lwc/template-compiler'; import { AnalyzerInput, PrimingDiagnostic, Range, Position, WireInfo } from './types'; export declare class StaticAnalyzer { startPos: Position; endPos: Position; emptyRange: Range; orderedWireInfos: WireInfo[]; wireInfoMap: Map; fileNamesMap: Map; /** * Given a bundle of files of different types (html, js), this method will perform static analysis of the input source files, * and will output the result of the analysis as an array of PrimingDiagnostic objects that are compliant with the lightning language server specifications. * @param input AnalyzerInput object containing the source files, their types, and namespace information required for analysis. * @returns array of PrimingDiagnostic, with each element containing the analysis message and location information for IDE syntax underlining. */ analyzeBundle(input: AnalyzerInput): PrimingDiagnostic[]; /** * Given a script (JS) file, this method will perform static analysis of the input source JS files, * and will output the result of the analysis as an array of PrimingDiagnostic objects that are compliant with the lightning language server specifications. * @param input AnalyzerInput object containing the source JS files, namespace and other information required for analysis. * @returns array of PrimingDiagnostic, with each element containing the analysis message and location information for IDE syntax underlining. */ analyzeScript(input: AnalyzerInput): PrimingDiagnostic[]; private processKomaciScriptDoc; /** * Given bundle komaciDocs, produce diagnostics for conditionals and iterators which are unanalyzable * @param templateKomaciDoc KomaciDoc which provides composition information * @param scriptKomaciDoc KomaciDoc which provides relevant adg information * @returns array of PrimingDiagnostic, with each element containing the analysis message and location information for IDE syntax underlining. */ processKomaciTemplateDoc(templateKomaciDoc: KomaciDocument | undefined, scriptKomaciDoc: KomaciDocument | undefined, diagnostics: PrimingDiagnostic[]): PrimingDiagnostic[]; private findWireConfigsThatUsePrivateProperty; /** * Traverses direct dependencies of the input wire (represented by a WireInfo) to see if any * are non-analyzable. If any are, the input wire is also marked as non-analyzable, and a PrimingDiagnostic * is generated for each dependency that is non-analyzable. * @param wireInfo the current WireInfo to evaluate * @param orderedWireInfos an array of dependency-sorted WireInfo against which to check the * state of dependencies of wireInfo * @returns array of PrimingDiagnostic containing a diagnostic for all non-analyzable wires found. */ private findPropagatedUnresolvedWireAdaptersFromConfigProp; private findUnresolvableWireAdaptersFromImports; private findWireConfigGetterReturningNonLiteral; private findWireConfigForGetterReturningInaccessibleImports; private findUnresolvedParentClass; private findParentClassFromUnsupportedNS; private findWiresWithReactivePropNameFromUnsupportedNS; /** * identify unsupported namespaces usage nested within wireConfig array property */ private findNestedUnsupportedNSArray; /** * identify unsupported namespaces usage nested within wireConfig object property */ private findNestedUnsupportedNSObject; private findWireConfigReferenceNonExistProperty; /** * Produce diagnostics for compositions which use unresolvable inputs, such as private properties * or wired properties which associated to unresolvable wires. * * @param properties the properties array * @param adgs the adgs associated with the template * @param diagnosics the diagnosics array * @param defaultHasParent if the default expored ADG inherent a parent class * @returns void */ private findUnresolvableCompositionProperty; /** * find Import name information (resourceName, importName) given komaciDoc imports and reference */ private findImport; private getMetadata; private findWireConfigReferenceCircularDependency; /** * Given an input array of FunctionType function nodes, this method creates an array of WireInfo that is * ordered in such a way that independent WireFunction nodes are placed towards the beginning of the array, and the * most dependent ones are placed towards the end of the array, so that iterating the array from beginning to end * while evaluating wire conditions without running into unencountered dependencies is actually possible * @param adg Adg, containing needed properties for this method * @param funcs Array of FunctionType, which correspond to WireInfos that this method creates * @returns and array of WireInfo, which contain references to FunctionType nodes for Wires, and other important state */ private reorderFunctionsByWireDependency; private dependsOn; private findWireInfo; findReferences(node: ChildNode, functionNames: string[]): void; } //# sourceMappingURL=staticAnalyzer.d.ts.map