UNPKG

1.51 kBTypeScriptView Raw
1import * as ts from 'typescript';
2import { RuleFailure } from 'tslint';
3import { CancellationToken } from './CancellationToken';
4import { NormalizedMessage } from './NormalizedMessage';
5import { ResolveTypeReferenceDirective, ResolveModuleName } from './resolution';
6import { createEslinter } from './createEslinter';
7export interface IncrementalCheckerInterface {
8 nextIteration(): void;
9 getDiagnostics(cancellationToken: CancellationToken): Promise<NormalizedMessage[]>;
10 hasLinter(): boolean;
11 getLints(cancellationToken: CancellationToken): NormalizedMessage[];
12 hasEsLinter(): boolean;
13 getEsLints(cancellationToken: CancellationToken): NormalizedMessage[];
14}
15export interface ApiIncrementalCheckerParams {
16 typescript: typeof ts;
17 context: string;
18 programConfigFile: string;
19 compilerOptions: ts.CompilerOptions;
20 createNormalizedMessageFromDiagnostic: (diagnostic: ts.Diagnostic) => NormalizedMessage;
21 linterConfigFile: string | boolean;
22 linterAutoFix: boolean;
23 createNormalizedMessageFromRuleFailure: (ruleFailure: RuleFailure) => NormalizedMessage;
24 eslinter: ReturnType<typeof createEslinter> | undefined;
25 checkSyntacticErrors: boolean;
26 resolveModuleName: ResolveModuleName | undefined;
27 resolveTypeReferenceDirective: ResolveTypeReferenceDirective | undefined;
28}
29export interface IncrementalCheckerParams extends ApiIncrementalCheckerParams {
30 watchPaths: string[];
31 workNumber: number;
32 workDivision: number;
33 vue: boolean;
34}