import * as t from '@babel/types'; import { ModuleContext } from '@komaci/common-shared'; import { GetterDiagnosticsContext, TemplateDiagnosticsContext } from './types'; import { SourceLocation } from '@babel/types'; import { Range } from '.'; import { Composition, Image, SourceLocation as KomaciSourceLocation } from '@komaci/types'; import { ModuleMetadata } from '@komaci/common-shared'; export declare const WIRE_FUNCTION = "WireFunction"; export declare const ERROR_PREFIX = "[komaci static-analyzer] "; /** * Determine whether the resource name is in a supported namespace * @param resourceName the resource name of the Import, as a string * @returns boolean true if the resource name is in a supported namespace */ export declare function isSupportedNamespace(resourceName: string | undefined): boolean; export declare const LLSRange: { /** * Converts an lwc-metadata SourceLocation (1-indexed for both line and column) into a Lightning Language * Server-compatible Range object. * @param {Location} location the SourceLocation, as represented by lwc-metadata, with komaci SourceLocation type * @returns {Range} the komaci, Lightning Language Server-compatible Range object */ fromLWCSourceLocation(location: KomaciSourceLocation | undefined): Range; /** * Converts a BabelJS SourceLocation (1-indexed for line, 0-indexed for column) into a Lightning Language * Server-compatible Range object. * @param {Location} location the SourceLocation, as represented by lwc-metadata, with komaci SourceLocation type * @returns {Range} the komaci, Lightning Language Server-compatible Range object */ fromBabelSourceLocation({ start, end }: SourceLocation): Range; }; /** * Function to analyze src code and returns any diagnostics found and valid getter contexts in a GetterDiagnosticContext * @param adgIndex index of the current adg to process * @param rootAst the Abstract Syntax Tree for the component * @param moduleMetadata metadata about the given component * @param moduleContext contextual details about the component, like module level variables, etc * @param templateReferences an optional list of template reference names. If specified, only getter functions that are in this list will be validated. * @returns diagnostics for the getters */ export declare function analyzeSrcForInvalidGetterFunctions(adgIndex: number, rootAst: t.File, moduleMetadata: ModuleMetadata, moduleContext: ModuleContext, templateReferences?: string[]): GetterDiagnosticsContext; /** * Function to analyze tempplate strings and collect any Priming Diagnostic info for them along with returning valid templates contexts * @param adgIndex index of the current adg to process * @param rootAst the Abstract Syntax Tree for the component * @param moduleMetadata metadata about the given component * @param moduleContext contextual details about the component, like module level variables, etc * @returns diagnostics for the template strings */ export declare function analyzeSrcForTemplateStringDiagnostics(adgIndex: number, rootAst: t.File, moduleMetadata: ModuleMetadata, moduleContext: ModuleContext): TemplateDiagnosticsContext; /** * Type guard for the komaci Image type * @param {Composition} composition the komaci Composition object * @returns {boolean} true if the Composition is more specifically an Image, false if it is not an Image */ export declare function isImageComposition(composition: Composition): composition is Image; //# sourceMappingURL=shared.d.ts.map