Skip to content

Commit

Permalink
fix: export OldPlugin from pretty-format (#9491)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Jan 31, 2020
1 parent cd6f755 commit 5196b71
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
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

0 comments on commit 5196b71

Please sign in to comment.