From 2a8db2f89f77fbbe8e20de19388818ba7557348c Mon Sep 17 00:00:00 2001 From: Chang Cao Date: Fri, 16 Sep 2022 11:15:20 +0800 Subject: [PATCH] fix: modify interface JestConfigWithTsJest --- src/types.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/types.ts b/src/types.ts index 810641d7c..9c85b0d13 100644 --- a/src/types.ts +++ b/src/types.ts @@ -17,7 +17,7 @@ declare module '@jest/types' { */ // eslint-disable-next-line // @ts-ignore - 'ts-jest'?: TsJestGlobalOptions + 'ts-jest': TsJestGlobalOptions } } } @@ -193,10 +193,11 @@ export interface InitialOptionsTsJest extends Config.InitialOptions { globals?: GlobalConfigTsJest } type TsJestTransformerOptions = TsJestGlobalOptions -export interface JestConfigWithTsJest extends Partial> { +export interface JestConfigWithTsJest extends Partial> { transform: { [regex: string]: 'ts-jest' | ['ts-jest', TsJestTransformerOptions] | string | [string, Record] } + globals?: { [K: string]: unknown } } export type StringMap = Map