Skip to content

Commit

Permalink
fix: mark ts-jest as optional in ConfigGlobals
Browse files Browse the repository at this point in the history
  • Loading branch information
Chang Cao authored and anh.pham committed Sep 17, 2022
1 parent 8011d5d commit 1ffd9c8
Showing 1 changed file with 4 additions and 7 deletions.
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

0 comments on commit 1ffd9c8

Please sign in to comment.