Skip to content

Commit 4a33ec1

Browse files
committed
docs: update new compiler options interface
1 parent 130057e commit 4a33ec1

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

website/docs/getting-started/presets.md

+21-7
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ Create a configuration to process TypeScript files (`.ts`/`.tsx`).
4141
An object contains Jest's `transform` property:
4242

4343
```ts
44+
import type { TsConfigJson } from 'type-fest'
45+
4446
interface TsJestTransformerOptions {
45-
tsconfig?: boolean | string | RawCompilerOptions
47+
tsconfig?: boolean | string | TsConfigJson.CompilerOptions
4648
isolatedModules?: boolean
4749
astTransformers?: ConfigCustomTransformer
4850
diagnostics?:
@@ -99,8 +101,10 @@ Create a **LEGACY** configuration to process TypeScript files (`.ts`, `.tsx`).
99101
An object contains Jest's `transform` property:
100102

101103
```ts
104+
import type { TsConfigJson } from 'type-fest'
105+
102106
interface TsJestTransformerOptions {
103-
tsconfig?: boolean | string | RawCompilerOptions
107+
tsconfig?: boolean | string | TsConfigJson.CompilerOptions
104108
isolatedModules?: boolean
105109
astTransformers?: ConfigCustomTransformer
106110
diagnostics?:
@@ -216,8 +220,10 @@ Create a **LEGACY** ESM configuration to process TypeScript files (`.ts`/`.mts`/
216220
An object contains Jest's `transform` property:
217221

218222
```ts
223+
import type { TsConfigJson } from 'type-fest'
224+
219225
interface TsJestTransformerOptions {
220-
tsconfig?: boolean | string | RawCompilerOptions
226+
tsconfig?: boolean | string | TsConfigJson.CompilerOptions
221227
isolatedModules?: boolean
222228
astTransformers?: ConfigCustomTransformer
223229
diagnostics?:
@@ -275,8 +281,10 @@ Create a configuration to process JavaScript/TypeScript files (`.js`/`.jsx`/`.ts
275281
An object contains Jest's `transform` property:
276282

277283
```ts
284+
import type { TsConfigJson } from 'type-fest'
285+
278286
interface TsJestTransformerOptions {
279-
tsconfig?: boolean | string | RawCompilerOptions
287+
tsconfig?: boolean | string | TsConfigJson.CompilerOptions
280288
isolatedModules?: boolean
281289
astTransformers?: ConfigCustomTransformer
282290
diagnostics?:
@@ -391,8 +399,10 @@ Create a ESM configuration to process JavaScript/TypeScript files (`.js`/`.mjs`/
391399
An object contains Jest's `transform` property:
392400

393401
```ts
402+
import type { TsConfigJson } from 'type-fest'
403+
394404
interface TsJestTransformerOptions {
395-
tsconfig?: boolean | string | RawCompilerOptions
405+
tsconfig?: boolean | string | TsConfigJson.CompilerOptions
396406
isolatedModules?: boolean
397407
astTransformers?: ConfigCustomTransformer
398408
diagnostics?:
@@ -508,8 +518,10 @@ Create a configuration to process JavaScript/TypeScript files (`.js`/`.jsx`/`.ts
508518
An object contains Jest's `transform` property:
509519

510520
```ts
521+
import type { TsConfigJson } from 'type-fest'
522+
511523
interface TsJestTransformerOptions {
512-
tsconfig?: boolean | string | RawCompilerOptions
524+
tsconfig?: boolean | string | TsConfigJson.CompilerOptions
513525
isolatedModules?: boolean
514526
astTransformers?: ConfigCustomTransformer
515527
diagnostics?:
@@ -628,8 +640,10 @@ Create a ESM configuration to process JavaScript/TypeScript files (`.js`/`.mjs`/
628640
An object contains Jest's `transform` property:
629641

630642
```ts
643+
import type { TsConfigJson } from 'type-fest'
644+
631645
interface TsJestTransformerOptions {
632-
tsconfig?: boolean | string | RawCompilerOptions
646+
tsconfig?: boolean | string | TsConfigJson.CompilerOptions
633647
isolatedModules?: boolean
634648
astTransformers?: ConfigCustomTransformer
635649
diagnostics?:

0 commit comments

Comments
 (0)