1 | import * as tsMod from "typescript";
|
2 | import { Program, SourceFile } from "typescript";
|
3 | import * as tsServer from "typescript/lib/tsserverlibrary.js";
|
4 | import { LitAnalyzerConfig } from "./lit-analyzer-config.js";
|
5 | import { LitAnalyzerLogger } from "./lit-analyzer-logger.js";
|
6 | import { RuleCollection } from "./rule-collection.js";
|
7 | import { AnalyzerDefinitionStore } from "./store/analyzer-definition-store.js";
|
8 | import { AnalyzerDependencyStore } from "./store/analyzer-dependency-store.js";
|
9 | import { AnalyzerDocumentStore } from "./store/analyzer-document-store.js";
|
10 | import { AnalyzerHtmlStore } from "./store/analyzer-html-store.js";
|
11 | export interface LitAnalyzerContext {
|
12 | readonly ts: typeof tsMod;
|
13 | readonly program: Program;
|
14 | readonly project: tsServer.server.Project | undefined;
|
15 | readonly config: LitAnalyzerConfig;
|
16 | readonly htmlStore: AnalyzerHtmlStore;
|
17 | readonly dependencyStore: AnalyzerDependencyStore;
|
18 | readonly documentStore: AnalyzerDocumentStore;
|
19 | readonly definitionStore: AnalyzerDefinitionStore;
|
20 | readonly logger: LitAnalyzerLogger;
|
21 | readonly rules: RuleCollection;
|
22 | readonly currentFile: SourceFile;
|
23 | readonly currentRunningTime: number;
|
24 | readonly isCancellationRequested: boolean;
|
25 | updateConfig(config: LitAnalyzerConfig): void;
|
26 | updateDependencies(file: SourceFile): void;
|
27 | updateComponents(file: SourceFile): void;
|
28 | setContextBase(contextBase: LitAnalyzerContextBaseOptions): void;
|
29 | }
|
30 | export interface LitAnalyzerContextBaseOptions {
|
31 | file: SourceFile | undefined;
|
32 | timeout?: number;
|
33 | throwOnCancellation?: boolean;
|
34 | }
|
35 | export interface LitPluginContextHandler {
|
36 | ts?: typeof tsMod;
|
37 | getProgram(): Program;
|
38 | getProject?(): tsServer.server.Project;
|
39 | }
|
40 |
|
\ | No newline at end of file |