| export declare class YqgStatus { | ||
| code: number; | ||
| code: number | string; | ||
| detail: string; | ||
@@ -4,0 +4,0 @@ serverResponseTime?: number; |
+1
-0
@@ -7,3 +7,4 @@ import * as HTTP_STATUS_CODE from 'http-status-codes'; | ||
| import YqgResponseProtocol from './response-protocol'; | ||
| export * from './constant'; | ||
| export { HTTP_STATUS_CODE, YQG_STATUS_CODE, httpParamSerialize, YqgHttp, YqgResource, YqgResponseProtocol }; | ||
| export default YqgHttp; |
+4
-0
| "use strict"; | ||
| function __export(m) { | ||
| for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
| } | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -15,2 +18,3 @@ var HTTP_STATUS_CODE = require("http-status-codes"); | ||
| exports.YqgResponseProtocol = response_protocol_1.default; | ||
| __export(require("./constant")); | ||
| exports.default = http_1.default; |
@@ -12,6 +12,6 @@ import { YqgStatus, YqgResponse, YqgStatusCodeMap } from './constant'; | ||
| success(body?: any): YqgResponse; | ||
| error(code: number | YqgStatus | Error, detail?: string): YqgResponse; | ||
| throw(code: number | YqgStatus | Error, detail?: string): never; | ||
| error(code: number | string | YqgStatus | Error, detail?: string): YqgResponse; | ||
| throw(code: number | string | YqgStatus | Error, detail?: string): never; | ||
| } | ||
| declare const _default: ResponseProtocol; | ||
| export default _default; |
| import { YqgStatusCodeMap } from './constant'; | ||
| declare const map: YqgStatusCodeMap; | ||
| export declare function getDetail(code: number): string; | ||
| export declare function getDetail(code: number | string): string; | ||
| export default map; |
| export declare const SUCCESS = 0; | ||
| export declare const COMMON_ERROR = -1001; | ||
| export declare const COMMON_ERROR = "@yqg/http.common_error"; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.SUCCESS = 0; | ||
| exports.COMMON_ERROR = -1001; | ||
| exports.COMMON_ERROR = '@yqg/http.common_error'; |
+1
-1
| { | ||
| "name": "@yqg/http", | ||
| "version": "0.0.2", | ||
| "version": "0.0.3", | ||
| "author": "YQG <developer@yangqianguan.com>", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/yqg-fe/yqg-util/tree/master/packages/@yqg/http", |
7708
3.1%207
2.48%