Skip to content

Commit

Permalink
chore: upgrade dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
luin committed Mar 14, 2022
1 parent f9a5071 commit df9330b
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 569 deletions.
4 changes: 2 additions & 2 deletions lib/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ interface ICommandOptions {
* @type {(string | null)}
* @memberof ICommandOptions
*/
replyEncoding?: string | null;
replyEncoding?: BufferEncoding | null;
errorStack?: Error;
keyPrefix?: string;
/**
Expand Down Expand Up @@ -155,7 +155,7 @@ export default class Command implements ICommand {
public ignore?: boolean;
public isReadOnly?: boolean;

private replyEncoding: string | null;
private replyEncoding: BufferEncoding | null;
private errorStack: Error;
public args: CommandParameter[];
private callback: CallbackFunction;
Expand Down
7 changes: 4 additions & 3 deletions lib/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { parse as urllibParse } from "url";
import { defaults, noop, flatten } from "./lodash";
import { defaults, noop } from "./lodash";
import { CallbackFunction } from "../types";
import Debug from "./debug";

Expand All @@ -15,7 +15,7 @@ import TLSProfiles from "../constants/TLSProfiles";
* expect(res).to.eql(['foo', ['bar']])
* ```
*/
export function convertBufferToString(value: any, encoding?: string) {
export function convertBufferToString(value: any, encoding?: BufferEncoding) {
if (value instanceof Buffer) {
return value.toString(encoding);
}
Expand Down Expand Up @@ -116,6 +116,7 @@ export function timeout(callback: CallbackFunction, timeout: number) {
callback.apply(this, arguments);
}
};
// @ts-expect-error we are using `arguments`
timer = setTimeout(run, timeout, new Error("timeout"));
return run;
}
Expand Down Expand Up @@ -332,4 +333,4 @@ export function zipMap<K, V>(keys: K[], values: V[]): Map<K, V> {
return map;
}

export { Debug, defaults, noop, flatten };
export { Debug, defaults, noop };
Loading

0 comments on commit df9330b

Please sign in to comment.