Skip to content

Commit

Permalink
Remove deprecated ability to pass ClientOptions.recover as a boolean
Browse files Browse the repository at this point in the history
Part of #1197.
  • Loading branch information
lawrence-forooghian committed Apr 27, 2023
1 parent adfe599 commit 399c896
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/common/lib/util/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,6 @@ export function objectifyOptions(options: ClientOptions | string): ClientOptions
}

export function normaliseOptions(options: InternalClientOptions): NormalisedClientOptions {
/* options.recover as a boolean is deprecated, and therefore is not part of the public typing */
if ((options.recover as any) === true) {
Logger.deprecated('{recover: true}', '{recover: function(lastConnectionDetails, cb) { cb(true); }}');
options.recover = function (lastConnectionDetails: unknown, cb: (shouldRecover: boolean) => void) {
cb(true);
};
}

if (typeof options.recover === 'function' && options.closeOnUnload === true) {
Logger.logAction(
Logger.LOG_ERROR,
Expand Down

0 comments on commit 399c896

Please sign in to comment.