Navigation Menu

Skip to content

Commit

Permalink
fix: πŸ› remove unused getArgAndCb function
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Jul 11, 2019
1 parent 6cf0bce commit f8bb0f8
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/volume.ts
Expand Up @@ -488,20 +488,6 @@ export function toUnixTimestamp(time) {
throw new Error('Cannot parse time: ' + time);
}

/**
* Returns optional argument and callback
* @param arg Argument or callback value
* @param callback Callback or undefined
* @param def Default argument value
*/
function getArgAndCb<TArg, TRes>(
arg: TArg | TCallback<TRes>,
callback?: TCallback<TRes>,
def?: TArg,
): [TArg, TCallback<TRes>] {
return typeof arg === 'function' ? [def, arg as TCallback<TRes>] : [arg, callback];
}

function validateUid(uid: number) {
if (typeof uid !== 'number') throw TypeError(ERRSTR.UID);
}
Expand Down

0 comments on commit f8bb0f8

Please sign in to comment.