UNPKG

1.43 kBTypeScriptView Raw
1import type { Config } from '@jest/types';
2import type * as _babel from 'babel__core';
3import type * as _ts from 'typescript';
4export declare type TTypeScript = typeof _ts;
5export declare type BabelConfig = _babel.TransformOptions;
6export interface AstTransformer<T = Record<string, unknown>> {
7 path: string;
8 options?: T;
9}
10export interface ConfigCustomTransformer {
11 before?: (string | AstTransformer)[];
12 after?: (string | AstTransformer)[];
13 afterDeclarations?: (string | AstTransformer)[];
14}
15export interface TsJestGlobalOptions {
16 tsConfig?: boolean | string | _ts.CompilerOptions;
17 tsconfig?: boolean | string | _ts.CompilerOptions;
18 packageJson?: boolean | string | Record<string, unknown>;
19 isolatedModules?: boolean;
20 compiler?: string;
21 astTransformers?: string[] | ConfigCustomTransformer;
22 diagnostics?: boolean | {
23 pretty?: boolean;
24 ignoreCodes?: number | string | (number | string)[];
25 pathRegex?: RegExp | string;
26 exclude?: Config.Glob[];
27 warnOnly?: boolean;
28 };
29 babelConfig?: boolean | string | BabelConfig;
30 stringifyContentPathRegex?: string | RegExp;
31}
32export interface TsJestDiagnosticsCfg {
33 pretty: boolean;
34 ignoreCodes: number[];
35 pathRegex?: string | undefined;
36 exclude: Config.Glob[];
37 throws: boolean;
38 warnOnly?: boolean;
39}
40export interface TsCompiler {
41 program: _ts.Program | undefined;
42}