Skip to content

Commit

Permalink
chore: remove disableRefreshCheck from NormalizedOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
pmmmwh committed Apr 20, 2020
1 parent c87efce commit ff1ac13
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*/

/**
* @typedef {import('type-fest').Merge<import('type-fest').SetRequired<ReactRefreshPluginOptions, 'exclude' | 'include'>, OverlayOverrides>} NormalizedPluginOptions
* @typedef {import('type-fest').Merge<import('type-fest').SetRequired<import('type-fest').Except<ReactRefreshPluginOptions, 'disableRefreshCheck' | 'overlay'>, 'exclude' | 'include'>, OverlayOverrides>} NormalizedPluginOptions
*/

module.exports = {};
32 changes: 16 additions & 16 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
export = ReactRefreshPlugin;
declare class ReactRefreshPlugin {
/**
* @param {import('./types').ReactRefreshPluginOptions} [options] Options for react-refresh-plugin.
*/
constructor(options?: import('./types').ReactRefreshPluginOptions | undefined);
/**
* @readonly
* @type {import('./types').NormalizedPluginOptions}
*/
readonly options: import('./types').NormalizedPluginOptions;
/**
* Applies the plugin.
* @param {import('webpack').Compiler} compiler A webpack compiler object.
* @returns {void}
*/
apply(compiler: import('webpack').Compiler): void;
/**
* @param {import('./types').ReactRefreshPluginOptions} [options] Options for react-refresh-plugin.
*/
constructor(options?: import("./types").ReactRefreshPluginOptions | undefined);
/**
* @readonly
* @type {import('./types').NormalizedPluginOptions}
*/
readonly options: import('./types').NormalizedPluginOptions;
/**
* Applies the plugin.
* @param {import('webpack').Compiler} compiler A webpack compiler object.
* @returns {void}
*/
apply(compiler: import("webpack").Compiler): void;
}
declare namespace ReactRefreshPlugin {
export { ReactRefreshPlugin };
export { ReactRefreshPlugin };
}
10 changes: 1 addition & 9 deletions types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,10 @@ export type OverlayOverrides = {
};
export type NormalizedPluginOptions = Pick<
{
/**
* Disables detection of react-refresh's Babel plugin (Deprecated since v0.3.0).
*/
disableRefreshCheck?: boolean | undefined;
/**
* Enables the plugin forcefully.
*/
forceEnable?: boolean | undefined;
/**
* Modifies how the error overlay integration works in the plugin.
*/
overlay?: boolean | ErrorOverlayOptions | undefined;
/**
* Uses a custom SocketJS implementation for older versions of webpack-dev-server.
*/
Expand All @@ -136,6 +128,6 @@ export type NormalizedPluginOptions = Pick<
*/
exclude: string | RegExp | (string | RegExp)[];
},
'include' | 'exclude' | 'disableRefreshCheck' | 'forceEnable' | 'useLegacyWDSSockets'
'include' | 'exclude' | 'forceEnable' | 'useLegacyWDSSockets'
> &
OverlayOverrides;

0 comments on commit ff1ac13

Please sign in to comment.