Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions e2e/config-typing/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ const jestCfg: JestConfigWithTsJest = {
},
],
},
globals: {
aaa: true,
},
}

export default jestCfg
11 changes: 4 additions & 7 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ declare module '@jest/types' {
*/
// eslint-disable-next-line
// @ts-ignore
'ts-jest': TsJestGlobalOptions
'ts-jest'?: TsJestGlobalOptions
}
}
}
Expand Down Expand Up @@ -184,7 +184,7 @@ export interface TransformOptionsTsJest extends TransformOptions {
* @deprecated use `JestConfigWithTsJest` instead
*/
export interface GlobalConfigTsJest extends Config.ConfigGlobals {
'ts-jest': TsJestGlobalOptions
'ts-jest'?: TsJestGlobalOptions
}
/**
* @deprecated use `JestConfigWithTsJest` instead
Expand All @@ -193,16 +193,13 @@ export interface InitialOptionsTsJest extends Config.InitialOptions {
globals?: GlobalConfigTsJest
}
type TsJestTransformerOptions = TsJestGlobalOptions
export interface JestConfigWithTsJest extends Partial<Omit<Config.ProjectConfig, 'transform'>> {
transform: {
export interface JestConfigWithTsJest extends Omit<Config.InitialOptions, 'transform'> {
transform?: {
[regex: string]: 'ts-jest' | ['ts-jest', TsJestTransformerOptions] | string | [string, Record<string, unknown>]
}
}

export type StringMap = Map<string, string>
/**
* @internal
*/
export interface DepGraphInfo {
fileContent: string
resolvedModuleNames: string[]
Expand Down