Skip to content

Commit 5196b71

Browse files
authored
fix: export OldPlugin from pretty-format (#9491)
1 parent cd6f755 commit 5196b71

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

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

1011
### Chore & Maintenance
1112

packages/pretty-format/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,12 +527,13 @@ prettyFormat.plugins = {
527527
ReactTestComponent,
528528
};
529529

530-
/* eslint-disable-next-line no-redeclare */
530+
// eslint-disable-next-line no-redeclare
531531
namespace prettyFormat {
532532
export type Colors = PrettyFormat.Colors;
533533
export type Config = PrettyFormat.Config;
534534
export type Options = PrettyFormat.Options;
535535
export type OptionsReceived = PrettyFormat.OptionsReceived;
536+
export type OldPlugin = PrettyFormat.OldPlugin;
536537
export type NewPlugin = PrettyFormat.NewPlugin;
537538
export type Plugin = PrettyFormat.Plugin;
538539
export type Plugins = PrettyFormat.Plugins;

packages/pretty-format/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ type PluginOptions = {
101101
spacing: string;
102102
};
103103

104-
type OldPlugin = {
104+
export type OldPlugin = {
105105
print: (
106106
val: any,
107107
print: Print,

0 commit comments

Comments
 (0)