oak-domain/lib/compiler/tscBuilder.d.ts

38 lines
1.1 KiB
TypeScript

import * as ts from 'typescript';
export declare const OAK_IGNORE_TAGS: string[];
interface OakBuildChecksConfig {
context?: {
checkAsyncContext?: boolean;
targetModules?: string[];
filePatterns?: string[];
};
}
interface CustomDiagnostic {
file: ts.SourceFile;
start: number;
length: number;
messageText: string;
category: ts.DiagnosticCategory;
code: number;
callChain?: string[];
contextCallNode?: ts.CallExpression;
reason?: string;
reasonDetails?: string[];
relatedInfo?: Array<{
file: ts.SourceFile;
start: number;
length: number;
message: string;
}>;
}
/**
* 执行自定义检查
* @param program ts.Program
* @param typeChecker ts.TypeChecker
* @param customConfig 自定义配置
* @returns CustomDiagnostic[] 自定义诊断列表
*/
export declare function performCustomChecks(program: ts.Program, typeChecker: ts.TypeChecker, customConfig: OakBuildChecksConfig): CustomDiagnostic[];
export declare const build: (pwd: string, args: any[]) => void;
export {};