From bf330585d0821e3575af836c9207831601b0afd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Wachter?= Date: Thu, 9 Nov 2017 13:24:09 +0100 Subject: [PATCH] Make values in callbacks nullable Values are null in case of errors. --- packages/grpc-native-core/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/grpc-native-core/index.d.ts b/packages/grpc-native-core/index.d.ts index 4493f4b6..f548a5f0 100644 --- a/packages/grpc-native-core/index.d.ts +++ b/packages/grpc-native-core/index.d.ts @@ -443,7 +443,7 @@ declare module "grpc" { * unary responses. */ type sendUnaryData = - (error: ServiceError | null, value: ResponseType, trailer?: Metadata, flags?: number) => void; + (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: number) => void; /** * A class for storing metadata. Keys are normalized to lowercase ASCII. @@ -1220,7 +1220,7 @@ declare module "grpc" { * @param value The response value, if the call succeeded */ export type requestCallback = - (error: ServiceError | null, value: ResponseType) => void; + (error: ServiceError | null, value: ResponseType | null) => void; /** * Return the underlying channel object for the specified client