-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AggregatedResult and GlobalConfig cannot be imported on older version of TS compiler #9899
Comments
This should be fixed in the latest version, no? Do you have a code snippet that gives TS errors importing from |
Sorry my bad, my lockfile was importing jest@25.2.0 for some reason. Thanks @SimenB. |
Aha! Good news, thank you 🙂 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Previously,
runCLI
,AggregatedResult
andGlobalConfig
were exported injest
but I found thatrunCLI
is now to be imported from@jest/core
andAggregatedResult
andGlobalConfig
from@jest/test-result
and@jest/types
respectively. Because these packages use theexport type
syntax, it is impossible to consume these using older versions of the TypeScript compiler.Similar issues
Jest recently published fixes for very similar issues - see #9703 and #9714.
Steps to reproduce the behavior:
import
@jest/types
or@jest/test-result
using an older version of the TypeScript compiler. The problem is:import
keyword does not understandexport type
.import type
is not available in older versions of TypeScript compiler.Expected behavior
@jest/types
or@jest/test-result
is import-able by a older versions of the TypeScript compiler.Link to how these exports are currently used
See how runCLI, AggregatedResult, and GlobalConfig are used: https://github.com/microsoft/rushstack/blob/fe4019a62d4dadeba329bafa0eab46b6f7bc0e67/core-build/gulp-core-build/src/tasks/JestTask.ts#L171-L177
The text was updated successfully, but these errors were encountered: