import { Adg, FunctionType, SourceLocation } from '@komaci/types'; import { ValidGetterContext, ValidTemplateContext } from '@komaci/common-shared'; /** Representation of a source code file being analyzed, in format neeed by the VSCode language server */ export declare type Uri = { path: string; scheme: string; fragment: ''; query: ''; authority: ''; }; /** * When a diagnostic message occurs in a specific file within a bundle, this type contains the information * needed by the VSCode language server, in the format it requires it. */ export declare type Code = { target: Uri; value: string | number; }; /** * This is consumed by the VSCode language server to enable it to report diagnosics * within the IDE, including the location (Range) of any error, warning, informational occurence. */ export declare type PrimingDiagnostic = DiagnosticMessage & { range: Range; }; /** * Contains information about a Diagnostic occurence while doing static analysis * in a format compatible with VSCode language server */ export declare type DiagnosticMessage = { code?: string | number | Code; severity: 'info' | 'warning' | 'error'; message: string; source: 'offline code analyzer'; }; export declare type Range = { start: Position; end: Position; }; export declare type Position = { line: number; character: number; }; export declare type AnalyzerInput = DiagnosticFileInfo | DiagnosticBundleInfo; export declare type StaticAnalyzerImportInfo = { name: string; namespace: string; location: SourceLocation; }; export declare type WireInfo = { funcIndex: number; propName?: string; isNonAnalyzable: boolean; dependentWires: WireInfo[]; location?: SourceLocation; wireFunction: FunctionType; adg: Adg; beingVisited: boolean; visited: boolean; }; export declare type DiagnosticInfo = { type: string; name: string; namespace: string; }; export declare type DiagnosticFileInfo = DiagnosticInfo & { type: 'file'; fileName: string; sourceFile: string; }; export declare type DiagnosticBundleInfo = DiagnosticInfo & { type: 'bundle'; files: { [fileName: string]: string; }; }; export declare type ImportBinding = { importPath: string; identifier: string; }; export declare type PrimingAdapterDefinition = { prime: ImportBinding; batch?: { prime: ImportBinding; reducer: ImportBinding; }; }; export declare type GetPrimingAdapter = { (importPath: string, identifier: string): PrimingAdapterDefinition | null; }; export declare type WireAdaptersMapping = { [importPath: string]: { [identifier: string]: PrimingAdapterDefinition; }; }; /** * Internal type for a composition property */ export declare type CompositionProperty = { propertyName: string; location?: SourceLocation; diagnosticMessageAct: 'iterator iterates upon' | "image's src attribute is bound to" | 'child component references'; }; export declare type GetterDiagnosticsContext = { getterFunctionDiagnostics: PrimingDiagnostic[]; validGetters: ValidGetterContext[]; }; export declare type TemplateDiagnosticsContext = { templateDiagnostics: PrimingDiagnostic[]; validTemplates: ValidTemplateContext[]; }; /** * Contextual info about the given contextual code block */ export declare type FunctionalContext = { declaredVariables: string[]; thisAliases: Set; }; //# sourceMappingURL=types.d.ts.map