Skip to content

Commit

Permalink
grpc-js: Add type predicate to fix errors for isFunction
Browse files Browse the repository at this point in the history
  • Loading branch information
zereraz committed Apr 27, 2021
1 parent 7a8cd5a commit 923b44b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/grpc-js/src/client.ts
Expand Up @@ -55,7 +55,7 @@ const INTERCEPTOR_SYMBOL = Symbol();
const INTERCEPTOR_PROVIDER_SYMBOL = Symbol();
const CALL_INVOCATION_TRANSFORMER_SYMBOL = Symbol();

function isFunction<ResponseType>(arg: Metadata | CallOptions | UnaryCallback<ResponseType>): boolean {
function isFunction<ResponseType>(arg: Metadata | CallOptions | UnaryCallback<ResponseType> | undefined): arg is UnaryCallback<ResponseType>{
return Object.prototype.toString.call(arg) === '[object Function]'
}

Expand Down

0 comments on commit 923b44b

Please sign in to comment.