Skip to content
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

fix(presets): use jest types for exposed default options #1172

Merged
merged 2 commits into from
Nov 15, 2021

Conversation

mgred
Copy link
Contributor

@mgred mgred commented Nov 15, 2021

Summary

The type TsJestPresets is only a subset of Jest's InitialOptions-type:

https://github.com/kulshekhar/ts-jest/blob/c7ba4593ffdcc2bc81c1193863ab2941c3376976/src/types.ts#L46-L49

When e.g. accessing property global (as shown in the documentation) TS will complain, because it is not Part of TsJestPresets.

Does this PR introduce a breaking change?

  • Yes
  • No

presets/index.d.ts Outdated Show resolved Hide resolved
@ahnpnl ahnpnl merged commit 81854f6 into thymikee:main Nov 15, 2021
@ahnpnl
Copy link
Collaborator

ahnpnl commented Nov 15, 2021

Thanks!

@mgred mgred deleted the fix-types branch November 15, 2021 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants