Skip to content

Commit 923b44b

Browse files
committed
grpc-js: Add type predicate to fix errors for isFunction
1 parent 7a8cd5a commit 923b44b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/grpc-js/src/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const INTERCEPTOR_SYMBOL = Symbol();
5555
const INTERCEPTOR_PROVIDER_SYMBOL = Symbol();
5656
const CALL_INVOCATION_TRANSFORMER_SYMBOL = Symbol();
5757

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

0 commit comments

Comments
 (0)