UNPKG

1.62 kBTypeScriptView Raw
1import { Logger } from 'bs-logger';
2import type * as ts from 'typescript';
3import type { RawCompilerOptions } from '../../raw-compiler-options';
4import type { TsJestAstTransformer, TsJestTransformOptions, TTypeScript } from '../../types';
5export declare class ConfigSet {
6 readonly parentLogger?: Logger | undefined;
7 /**
8 * Use by e2e, don't mark as internal
9 */
10 readonly tsJestDigest: string;
11 readonly logger: Logger;
12 readonly compilerModule: TTypeScript;
13 readonly isolatedModules: boolean;
14 readonly cwd: string;
15 readonly rootDir: string;
16 cacheSuffix: string;
17 tsCacheDir: string | undefined;
18 parsedTsConfig: ts.ParsedCommandLine | Record<string, any>;
19 resolvedTransformers: TsJestAstTransformer;
20 useESM: boolean;
21 constructor(jestConfig: TsJestTransformOptions['config'] | undefined, parentLogger?: Logger | undefined);
22 /**
23 * Load TypeScript configuration. Returns the parsed TypeScript config and any `tsconfig` options specified in ts-jest
24 * Subclasses which extend `ConfigSet` can override the default behavior
25 */
26 protected _resolveTsConfig(compilerOptions?: RawCompilerOptions, resolvedConfigFile?: string): Record<string, any>;
27 isTestFile(fileName: string): boolean;
28 shouldStringifyContent(filePath: string): boolean;
29 raiseDiagnostics(diagnostics: ts.Diagnostic[], filePath?: string, logger?: Logger): void;
30 shouldReportDiagnostics(filePath: string): boolean;
31 resolvePath(inputPath: string, { throwIfMissing, nodeResolve }?: {
32 throwIfMissing?: boolean;
33 nodeResolve?: boolean;
34 }): string;
35}