Skip to content

Commit

Permalink
revert: allow babelConfig in default/js-with-ts presets
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnpnl committed Jul 8, 2024
1 parent 06f78ed commit 7a3abe4
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,6 @@ export interface JestConfigWithTsJest extends Omit<Config.InitialOptions, 'trans
}
}

/**
* @deprecated use `DefaultPreset`/`JsWithTsPreset`/`JsWithBabelPreset` instead
*/
export type TsJestPresets = Pick<
JestConfigWithTsJest,
'extensionsToTreatAsEsm' | 'moduleFileExtensions' | 'transform' | 'testMatch'
>

export type StringMap = Map<string, string>
export interface DepGraphInfo {
fileContent: string
Expand Down Expand Up @@ -245,7 +237,15 @@ export interface TsJestAstTransformer {
afterDeclarations: AstTransformerDesc[]
}

export type DefaultTransformOptions = Omit<TsJestTransformerOptions, 'useESM' | 'babelConfig'>
/**
* @deprecated use other preset types below instead
*/
export type TsJestPresets = Pick<
JestConfigWithTsJest,
'extensionsToTreatAsEsm' | 'moduleFileExtensions' | 'transform' | 'testMatch'
>

export type DefaultTransformOptions = Omit<TsJestTransformerOptions, 'useESM'>
export type DefaultPreset = {
transform: {
[TS_TRANSFORM_PATTERN]: ['ts-jest', DefaultTransformOptions]
Expand All @@ -271,7 +271,7 @@ export type DefaultEsmLegacyPreset = {
}
}

export type JsWithTsTransformOptions = Omit<TsJestTransformerOptions, 'useESM' | 'babelConfig'>
export type JsWithTsTransformOptions = Omit<TsJestTransformerOptions, 'useESM'>
export type JsWithTsPreset = {
transform: {
[TS_JS_TRANSFORM_PATTERN]: ['ts-jest', JsWithTsTransformOptions]
Expand Down

0 comments on commit 7a3abe4

Please sign in to comment.