From f79aa11f59f3e02df39122fbfecceea92759ede9 Mon Sep 17 00:00:00 2001 From: Connor Burton Date: Thu, 22 Sep 2022 11:24:10 +0100 Subject: [PATCH] fix: use correct typings for `config:init` command --- src/cli/cli.spec.ts | 4 ++-- src/cli/config/init.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli/cli.spec.ts b/src/cli/cli.spec.ts index 0a01b42eb6..4d32974f7b 100644 --- a/src/cli/cli.spec.ts +++ b/src/cli/cli.spec.ts @@ -135,7 +135,7 @@ Jest configuration written to "${normalize('/foo/bar/jest.config.js')}". expect(fs.writeFileSync.mock.calls).toEqual([ [ normalize('/foo/bar/jest.config.js'), - `/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ + `/** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { preset: 'ts-jest', testEnvironment: 'node', @@ -159,7 +159,7 @@ Jest configuration written to "${normalize('/foo/bar/jest.config.foo.js')}". normalize('/foo/bar/jest.config.foo.js'), `const { jsWithTs: tsjPreset } = require('ts-jest/presets'); -/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ +/** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { ...tsjPreset, globals: { diff --git a/src/cli/config/init.ts b/src/cli/config/init.ts index aef6963158..215fd0ab1d 100644 --- a/src/cli/config/init.ts +++ b/src/cli/config/init.ts @@ -89,7 +89,7 @@ export const run: CliCommand = async (args: CliCommandArgs /* , logger: Logger * if (!jestPreset) { content.push(`${preset.jsImport('tsjPreset')};`, '') } - content.push(`/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */`) + content.push(`/** @type {import('ts-jest').JestConfigWithTsJest} */`) content.push('module.exports = {') if (jestPreset) { content.push(` preset: '${preset.name}',`)