diff --git a/Libraries/YellowBox/Data/YellowBoxRegistry.js b/Libraries/YellowBox/Data/YellowBoxRegistry.js index 0c98ca00f..b6a445f89 100644 --- a/Libraries/YellowBox/Data/YellowBoxRegistry.js +++ b/Libraries/YellowBox/Data/YellowBoxRegistry.js @@ -18,7 +18,7 @@ export type Registry = Map>; export type Observer = (registry: Registry) => void; -type IgnorePattern = string | RegExp; +export type IgnorePattern = string | RegExp; export type Subscription = $ReadOnly<{| unsubscribe: () => void, diff --git a/Libraries/YellowBox/YellowBox.js b/Libraries/YellowBox/YellowBox.js index 0b6768110..4f7d41284 100644 --- a/Libraries/YellowBox/YellowBox.js +++ b/Libraries/YellowBox/YellowBox.js @@ -13,7 +13,7 @@ const React = require('React'); import type {Category} from 'YellowBoxCategory'; -import type {Registry, Subscription} from 'YellowBoxRegistry'; +import type {Registry, Subscription, IgnorePattern} from 'YellowBoxRegistry'; type Props = $ReadOnly<{||}>; type State = {| @@ -50,7 +50,7 @@ if (__DEV__) { // eslint-disable-next-line no-shadow YellowBox = class YellowBox extends React.Component { - static ignoreWarnings(patterns: $ReadOnlyArray): void { + static ignoreWarnings(patterns: $ReadOnlyArray): void { YellowBoxRegistry.addIgnorePatterns(patterns); } @@ -135,7 +135,7 @@ if (__DEV__) { }; } else { YellowBox = class extends React.Component { - static ignoreWarnings(patterns: $ReadOnlyArray): void { + static ignoreWarnings(patterns: $ReadOnlyArray): void { // Do nothing. }