blob: 5628226b986dbdad8b98f07498ac75bc0a22764a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
import { StatusObject } from './call-interface';
import { Status } from './constants';
import { Metadata } from './metadata';
/**
* A builder for gRPC status objects.
*/
export declare class StatusBuilder {
private code;
private details;
private metadata;
constructor();
/**
* Adds a status code to the builder.
*/
withCode(code: Status): this;
/**
* Adds details to the builder.
*/
withDetails(details: string): this;
/**
* Adds metadata to the builder.
*/
withMetadata(metadata: Metadata): this;
/**
* Builds the status object.
*/
build(): Partial<StatusObject>;
}
|