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: export OldPlugin from pretty-format #9491

Merged
merged 2 commits into from Jan 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,7 @@

- `[jest-snapshot]` Downgrade semver to v6 to support node 8 ([#9451](https://github.com/facebook/jest/pull/9451))
- `[jest-transform]` Correct sourcemap behavior for transformed and instrumented code ([#9460](https://github.com/facebook/jest/pull/9460))
- `[pretty-format]` Export `OldPlugin` type ([#9491](https://github.com/facebook/jest/pull/9491))

### Chore & Maintenance

Expand Down
3 changes: 2 additions & 1 deletion packages/pretty-format/src/index.ts
Expand Up @@ -527,12 +527,13 @@ prettyFormat.plugins = {
ReactTestComponent,
};

/* eslint-disable-next-line no-redeclare */
// eslint-disable-next-line no-redeclare
namespace prettyFormat {
export type Colors = PrettyFormat.Colors;
export type Config = PrettyFormat.Config;
export type Options = PrettyFormat.Options;
export type OptionsReceived = PrettyFormat.OptionsReceived;
export type OldPlugin = PrettyFormat.OldPlugin;
export type NewPlugin = PrettyFormat.NewPlugin;
export type Plugin = PrettyFormat.Plugin;
export type Plugins = PrettyFormat.Plugins;
Expand Down
2 changes: 1 addition & 1 deletion packages/pretty-format/src/types.ts
Expand Up @@ -101,7 +101,7 @@ type PluginOptions = {
spacing: string;
};

type OldPlugin = {
export type OldPlugin = {
print: (
val: any,
print: Print,
Expand Down