@jayfong/x-request 2.86.2 → 2.87.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/_cjs/index.js CHANGED
@@ -255,7 +255,7 @@ class XRequest {
255
255
  static extend(options) {
256
256
  return new XRequest(options);
257
257
  }
258
- constructor(options) {
258
+ constructor(options = {}) {
259
259
  this.options = options;
260
260
  }
261
261
  get(options, responseType) {
package/lib/index.d.ts CHANGED
@@ -144,7 +144,7 @@ export declare class XRequestFormFile {
144
144
  });
145
145
  }
146
146
  export declare class XRequest {
147
- private options?;
147
+ options: OmitStrict<XRequestOptions, 'url'>;
148
148
  private static getGotOptions;
149
149
  private static afterResponse;
150
150
  static get(options: XRequestGetOptions): Promise<XRequestResponse<Buffer>>;
@@ -180,7 +180,7 @@ export declare class XRequest {
180
180
  type?: string;
181
181
  }): XRequestFormFile;
182
182
  static extend(options: OmitStrict<XRequestOptions, 'url'>): XRequest;
183
- constructor(options?: OmitStrict<XRequestOptions, "url"> | undefined);
183
+ constructor(options?: OmitStrict<XRequestOptions, 'url'>);
184
184
  get(options: XRequestGetOptions): Promise<XRequestResponse<Buffer>>;
185
185
  get(options: XRequestGetOptions, responseType: 'buffer'): Promise<XRequestResponse<Buffer>>;
186
186
  get(options: XRequestGetOptions, responseType: 'text'): Promise<XRequestResponse<string>>;
package/lib/index.js CHANGED
@@ -246,7 +246,7 @@ export class XRequest {
246
246
  static extend(options) {
247
247
  return new XRequest(options);
248
248
  }
249
- constructor(options) {
249
+ constructor(options = {}) {
250
250
  this.options = options;
251
251
  }
252
252
  get(options, responseType) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jayfong/x-request",
3
- "version": "2.86.2",
3
+ "version": "2.87.0",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "lib/_cjs/index.js",