@@ -26,9 +26,15 @@ declare module '@jest/types' {
|
26 | 26 | * @internal
|
27 | 27 | */
|
28 | 28 | export type TBabelCore = typeof _babel
|
| 29 | +/** |
| 30 | +* @internal |
| 31 | +*/ |
29 | 32 | export type TBabelJest = typeof babelJest
|
30 | 33 | export type TTypeScript = typeof _ts
|
31 | 34 | // Stimulate `esbuild` type to avoid import `esbuild` while building the assets which are shipped to npm
|
| 35 | +/** |
| 36 | +* @internal |
| 37 | +*/ |
32 | 38 | export interface TEsBuild {
|
33 | 39 | transformSync(
|
34 | 40 | input: string,
|
@@ -62,6 +68,9 @@ export interface ConfigCustomTransformer {
|
62 | 68 | afterDeclarations?: Array<string | AstTransformer>
|
63 | 69 | }
|
64 | 70 |
|
| 71 | +/** |
| 72 | +* @deprecated use `TsJestTransformerOptions` instead |
| 73 | +*/ |
65 | 74 | export interface TsJestGlobalOptions {
|
66 | 75 | /**
|
67 | 76 | * Compiler options. It can be:
|
@@ -156,67 +165,44 @@ export interface TsJestGlobalOptions {
|
156 | 165 | useESM?: boolean
|
157 | 166 | }
|
158 | 167 |
|
159 |
| -interface TsJestConfig$tsConfig$file { |
160 |
| -kind: 'file' |
161 |
| -value: string | undefined |
162 |
| -} |
163 |
| -interface TsJestConfig$tsConfig$inline { |
164 |
| -kind: 'inline' |
165 |
| -value: _ts.CompilerOptions |
166 |
| -} |
167 |
| -type TsJestConfig$tsConfig = TsJestConfig$tsConfig$file | TsJestConfig$tsConfig$inline | undefined |
168 |
| -export interface TsJestDiagnosticsCfg { |
169 |
| -pretty: boolean |
170 |
| -ignoreCodes: number[] |
171 |
| -exclude: string[] |
172 |
| -throws: boolean |
173 |
| -warnOnly?: boolean |
174 |
| -} |
175 |
| -interface TsJestConfig$babelConfig$file { |
176 |
| -kind: 'file' |
177 |
| -value: string | undefined |
178 |
| -} |
179 |
| -interface TsJestConfig$babelConfig$inline { |
180 |
| -kind: 'inline' |
181 |
| -value: BabelConfig |
182 |
| -} |
183 |
| -type TsJestConfig$babelConfig = TsJestConfig$babelConfig$file | TsJestConfig$babelConfig$inline | undefined |
184 |
| -/** |
185 |
| -* @internal |
186 |
| -*/ |
187 |
| -export interface TsJestConfig { |
188 |
| -tsconfig: TsJestConfig$tsConfig |
189 |
| -isolatedModules: boolean |
190 |
| -compiler: string |
191 |
| -diagnostics: TsJestDiagnosticsCfg |
192 |
| -babelConfig: TsJestConfig$babelConfig |
193 |
| -transformers: ConfigCustomTransformer |
194 |
| -// to deprecate / deprecated === === === |
195 |
| -stringifyContentPathRegex: string | undefined |
196 |
| -} |
197 |
| - |
198 | 168 | /**
|
199 | 169 | * For transformers which extends `ts-jest`
|
| 170 | +* @deprecated use `JestConfigWithTsJest` instead |
200 | 171 | */
|
201 | 172 | export interface ProjectConfigTsJest extends Config.ProjectConfig {
|
202 | 173 | globals: GlobalConfigTsJest
|
203 | 174 | }
|
| 175 | +/** |
| 176 | +* @deprecated use `JestConfigWithTsJest` instead |
| 177 | +*/ |
204 | 178 | export interface TransformOptionsTsJest extends TransformOptions {
|
205 | 179 | config: ProjectConfigTsJest
|
206 | 180 | }
|
207 | 181 |
|
208 | 182 | /**
|
209 | 183 | * For typings in `jest.config.ts`
|
| 184 | +* @deprecated use `JestConfigWithTsJest` instead |
210 | 185 | */
|
211 | 186 | export interface GlobalConfigTsJest extends Config.ConfigGlobals {
|
212 | 187 | 'ts-jest': TsJestGlobalOptions
|
213 | 188 | }
|
| 189 | +/** |
| 190 | +* @deprecated use `JestConfigWithTsJest` instead |
| 191 | +*/ |
214 | 192 | export interface InitialOptionsTsJest extends Config.InitialOptions {
|
215 | 193 | globals?: GlobalConfigTsJest
|
216 | 194 | }
|
| 195 | +type TsJestTransformerOptions = TsJestGlobalOptions |
| 196 | +export interface JestConfigWithTsJest extends Partial<Omit<Config.ProjectConfig, 'transform'>> { |
| 197 | +transform: { |
| 198 | +[regex: string]: 'ts-jest' | ['ts-jest', TsJestTransformerOptions] | string | [string, Record<string, unknown>] |
| 199 | +} |
| 200 | +} |
217 | 201 |
|
218 | 202 | export type StringMap = Map<string, string>
|
219 |
| - |
| 203 | +/** |
| 204 | +* @internal |
| 205 | +*/ |
220 | 206 | export interface DepGraphInfo {
|
221 | 207 | fileContent: string
|
222 | 208 | resolvedModuleNames: string[]
|
|
0 commit comments