@@ -23,30 +23,21 @@ export enum DiagnosticTypes {
2323 global = 'global' ,
2424 semantic = 'sementic' ,
2525}
26- export enum DiagnosticSets {
27- none = 'none' ,
28- full = 'full' ,
29- default = 'default' ,
30- }
31- export const diagnosticSets = {
32- full : [
33- DiagnosticTypes . global ,
34- DiagnosticTypes . syntactic ,
35- DiagnosticTypes . semantic ,
36- DiagnosticTypes . options ,
37- ] ,
38- default : [ DiagnosticTypes . syntactic , DiagnosticTypes . options ] ,
39- none : [ ] ,
40- } ;
26+ export type DiagnosticFilter = DiagnosticTypes [ ] | DiagnosticTypes ;
27+ export type TsTransformerFactory =
28+ | _ts . TransformerFactory < _ts . SourceFile >
29+ | string ;
4130
4231// FIXME: find the right typing for this
4332export type BabelConfig = _babel . TransformOptions ;
4433
4534export interface TsJestGlobalOptions {
4635 // either a path to a tsconfig json file, or inline compiler options
4736 tsConfig ?: string | _ts . CompilerOptions ;
37+
4838 // what kind of diagnostics to report
49- diagnostics ?: DiagnosticTypes [ ] | DiagnosticTypes | DiagnosticSets | boolean ;
39+ diagnostics ?: DiagnosticFilter | boolean | undefined ;
40+
5041 // whether to use babel jest under the hood or not
5142 // it can be:
5243 // - a path to a babelrc (<rootDir> can be used)
@@ -60,12 +51,12 @@ export interface TsJestGlobalOptions {
6051}
6152
6253export interface TsJestConfig {
63- inputOptions : TsJestGlobalOptions ;
64- babelJest : BabelConfig | string | false ;
54+ tsConfig : _ts . CompilerOptions | string | undefined ;
55+ babelJest : BabelConfig | string | undefined ;
6556 diagnostics : DiagnosticTypes [ ] ;
6657
6758 // to deprecate / deprecated === === ===
68- stringifyContentPathRegex ? : RegExp | undefined ;
59+ stringifyContentPathRegex : RegExp | undefined ;
6960}
7061
7162export interface TsJestProgram {
0 commit comments