We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 558702b commit eb00effCopy full SHA for eb00eff
index.d.ts
@@ -528,14 +528,19 @@ export declare namespace httpc {
528
urllibOptions: RequestOptions;
529
}
530
531
+ // responseWrapper.js
532
interface ResponseWrapperOptions<T = any> {
533
data: T;
534
resp: IncomingMessage;
535
536
- // responseWrapper.js
537
+ interface ResponseError {
538
+ error_code?: string,
539
+ error?: string,
540
+ }
541
+
542
class ResponseWrapper<T = any> {
- data: T;
543
+ data: T extends void ? undefined | ResponseError : T & ResponseError;
544
545
constructor(options: ResponseWrapperOptions);
546
ok(): boolean;
0 commit comments