mirror of
https://github.com/grpc/grpc-node.git
synced 2026-02-01 14:54:35 +00:00
Make values in callbacks nullable
Values are null in case of errors.
This commit is contained in:
parent
680d60584a
commit
bf330585d0
4
packages/grpc-native-core/index.d.ts
vendored
4
packages/grpc-native-core/index.d.ts
vendored
@ -443,7 +443,7 @@ declare module "grpc" {
|
||||
* unary responses.
|
||||
*/
|
||||
type sendUnaryData<ResponseType> =
|
||||
(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<ResponseType> =
|
||||
(error: ServiceError | null, value: ResponseType) => void;
|
||||
(error: ServiceError | null, value: ResponseType | null) => void;
|
||||
|
||||
/**
|
||||
* Return the underlying channel object for the specified client
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user