Skip to content

Commit

Permalink
fix: modify interface JestConfigWithTsJest
Browse files Browse the repository at this point in the history
  • Loading branch information
Chang Cao committed Sep 16, 2022
1 parent 8bb5ed7 commit 2a8db2f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 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 @@ -193,10 +193,11 @@ export interface InitialOptionsTsJest extends Config.InitialOptions {
globals?: GlobalConfigTsJest
}
type TsJestTransformerOptions = TsJestGlobalOptions
export interface JestConfigWithTsJest extends Partial<Omit<Config.ProjectConfig, 'transform'>> {
export interface JestConfigWithTsJest extends Partial<Omit<Config.InitialOptions, 'transform' | 'globals'>> {
transform: {
[regex: string]: 'ts-jest' | ['ts-jest', TsJestTransformerOptions] | string | [string, Record<string, unknown>]
}
globals?: { [K: string]: unknown }
}

export type StringMap = Map<string, string>
Expand Down

0 comments on commit 2a8db2f

Please sign in to comment.