Skip to content

Conversation

@BPScott
Copy link
Contributor

@BPScott BPScott commented Sep 11, 2025

Summary

When type-checking the code

import {createTransformer} from 'babel-jest';
const transformer = createTransformer();
export default transformer;

I get type checking error:

error TS9006: Declaration emit for this file requires using private name 'TransformerConfig' from module '"MY_PROJECT_PATH_HERE/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/babel-jest/build/index"'. An explicit type annotation may unblock declaration emit.

3 import {createTransformer} from 'babel-jest';
  ~~~~~~

This is because TransformerConfig is not a publicly exported type.
Exporting the type makes the error go away.

Test plan

I modified node_modules/.pnpm/[email protected]_@[email protected]/node_modules/babel-jest/build/index.d.ts to export declaration of TransformerConfig and reran my type-checking and it passed.

@netlify
Copy link

netlify bot commented Sep 11, 2025

Deploy Preview for jestjs ready!

Name Link
🔨 Latest commit 7e8c4b2
🔍 Latest deploy log https://app.netlify.com/projects/jestjs/deploys/68d4fc20ead4050008fc9c52
😎 Deploy Preview https://deploy-preview-15820--jestjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 11, 2025

Open in StackBlitz

babel-jest

npm i https://pkg.pr.new/babel-jest@15820

babel-plugin-jest-hoist

npm i https://pkg.pr.new/babel-plugin-jest-hoist@15820

babel-preset-jest

npm i https://pkg.pr.new/babel-preset-jest@15820

create-jest

npm i https://pkg.pr.new/create-jest@15820

@jest/diff-sequences

npm i https://pkg.pr.new/@jest/diff-sequences@15820

expect

npm i https://pkg.pr.new/expect@15820

@jest/expect-utils

npm i https://pkg.pr.new/@jest/expect-utils@15820

jest

npm i https://pkg.pr.new/jest@15820

jest-changed-files

npm i https://pkg.pr.new/jest-changed-files@15820

jest-circus

npm i https://pkg.pr.new/jest-circus@15820

jest-cli

npm i https://pkg.pr.new/jest-cli@15820

jest-config

npm i https://pkg.pr.new/jest-config@15820

@jest/console

npm i https://pkg.pr.new/@jest/console@15820

@jest/core

npm i https://pkg.pr.new/@jest/core@15820

@jest/create-cache-key-function

npm i https://pkg.pr.new/@jest/create-cache-key-function@15820

jest-diff

npm i https://pkg.pr.new/jest-diff@15820

jest-docblock

npm i https://pkg.pr.new/jest-docblock@15820

jest-each

npm i https://pkg.pr.new/jest-each@15820

@jest/environment

npm i https://pkg.pr.new/@jest/environment@15820

jest-environment-jsdom

npm i https://pkg.pr.new/jest-environment-jsdom@15820

@jest/environment-jsdom-abstract

npm i https://pkg.pr.new/@jest/environment-jsdom-abstract@15820

jest-environment-node

npm i https://pkg.pr.new/jest-environment-node@15820

@jest/expect

npm i https://pkg.pr.new/@jest/expect@15820

@jest/fake-timers

npm i https://pkg.pr.new/@jest/fake-timers@15820

@jest/get-type

npm i https://pkg.pr.new/@jest/get-type@15820

@jest/globals

npm i https://pkg.pr.new/@jest/globals@15820

jest-haste-map

npm i https://pkg.pr.new/jest-haste-map@15820

jest-jasmine2

npm i https://pkg.pr.new/jest-jasmine2@15820

jest-leak-detector

npm i https://pkg.pr.new/jest-leak-detector@15820

jest-matcher-utils

npm i https://pkg.pr.new/jest-matcher-utils@15820

jest-message-util

npm i https://pkg.pr.new/jest-message-util@15820

jest-mock

npm i https://pkg.pr.new/jest-mock@15820

@jest/pattern

npm i https://pkg.pr.new/@jest/pattern@15820

jest-phabricator

npm i https://pkg.pr.new/jest-phabricator@15820

jest-regex-util

npm i https://pkg.pr.new/jest-regex-util@15820

@jest/reporters

npm i https://pkg.pr.new/@jest/reporters@15820

jest-resolve

npm i https://pkg.pr.new/jest-resolve@15820

jest-resolve-dependencies

npm i https://pkg.pr.new/jest-resolve-dependencies@15820

jest-runner

npm i https://pkg.pr.new/jest-runner@15820

jest-runtime

npm i https://pkg.pr.new/jest-runtime@15820

@jest/schemas

npm i https://pkg.pr.new/@jest/schemas@15820

jest-snapshot

npm i https://pkg.pr.new/jest-snapshot@15820

@jest/snapshot-utils

npm i https://pkg.pr.new/@jest/snapshot-utils@15820

@jest/source-map

npm i https://pkg.pr.new/@jest/source-map@15820

@jest/test-result

npm i https://pkg.pr.new/@jest/test-result@15820

@jest/test-sequencer

npm i https://pkg.pr.new/@jest/test-sequencer@15820

@jest/transform

npm i https://pkg.pr.new/@jest/transform@15820

@jest/types

npm i https://pkg.pr.new/@jest/types@15820

jest-util

npm i https://pkg.pr.new/jest-util@15820

jest-validate

npm i https://pkg.pr.new/jest-validate@15820

jest-watcher

npm i https://pkg.pr.new/jest-watcher@15820

jest-worker

npm i https://pkg.pr.new/jest-worker@15820

pretty-format

npm i https://pkg.pr.new/pretty-format@15820

commit: c775af7

@BPScott BPScott changed the title Export TransformerConfig interface from index.ts Export TransformerConfig interface from babel-jest Sep 11, 2025
@BPScott
Copy link
Contributor Author

BPScott commented Sep 24, 2025

ping @cpojer @SimenB for review

@SimenB
Copy link
Member

SimenB commented Sep 25, 2025

Thanks!

@SimenB SimenB merged commit ddf97f7 into jestjs:main Sep 25, 2025
8 of 9 checks passed
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants