From d109036a406155b1c45853e949cb36176ed4c3c6 Mon Sep 17 00:00:00 2001 From: Ryan Ling Date: Fri, 22 Dec 2023 11:12:06 +1100 Subject: [PATCH] Avoid TS4082 in Jest configuration files --- .changeset/funny-mugs-brake.md | 9 +++++++++ src/api/jest/index.ts | 4 ++++ 2 files changed, 13 insertions(+) create mode 100644 .changeset/funny-mugs-brake.md diff --git a/.changeset/funny-mugs-brake.md b/.changeset/funny-mugs-brake.md new file mode 100644 index 000000000..c5fa21986 --- /dev/null +++ b/.changeset/funny-mugs-brake.md @@ -0,0 +1,9 @@ +--- +'skuba': patch +--- + +Jest: Export `Config` type + +This resolves a TypeScript error that could present itself when using `Jest.mergePreset` with the [`declaration`](https://www.typescriptlang.org/tsconfig#declaration) compiler option: + +> TS4082: Default export of the module has or is using private name `ConfigGlobals`. diff --git a/src/api/jest/index.ts b/src/api/jest/index.ts index d2abf4f4d..91c3107e9 100644 --- a/src/api/jest/index.ts +++ b/src/api/jest/index.ts @@ -3,6 +3,10 @@ import type { Config } from '@jest/types'; import jestPreset from '../../../jest-preset'; import { mergeRaw } from '../../cli/configure/processing/record'; +// Avoid TS4082 in Jest configuration files: +// Default export of the module has or is using private name `ConfigGlobals`. +export type { Config } from '@jest/types'; + /** * Set of Jest options that are recommended and supported for customisation. *