msw 0.36.2 → 0.36.7

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.
@@ -2,7 +2,7 @@
2
2
  /* tslint:disable */
3
3
 
4
4
  /**
5
- * Mock Service Worker (0.36.2).
5
+ * Mock Service Worker (0.36.7).
6
6
  * @see https://github.com/mswjs/msw
7
7
  * - Please do NOT modify this file.
8
8
  * - Please do NOT serve this file on production.
@@ -10,7 +10,7 @@ export declare const defaultContext: {
10
10
  fetch: (input: string | MockedRequest<DefaultRequestBody>, requestInit?: RequestInit) => Promise<Response>;
11
11
  };
12
12
  export declare type DefaultRequestMultipartBody = Record<string, string | File | (string | File)[]>;
13
- export declare type DefaultRequestBody = Record<string, any> | DefaultRequestMultipartBody | string | number | undefined;
13
+ export declare type DefaultRequestBody = Record<string, any> | DefaultRequestMultipartBody | string | number | boolean | null | undefined;
14
14
  export interface MockedRequest<Body = DefaultRequestBody> {
15
15
  id: string;
16
16
  url: URL;
@@ -14,7 +14,7 @@ export interface HandleRequestOptions<ResponseType> {
14
14
  };
15
15
  /**
16
16
  * Transforms a `MockedResponse` instance returned from a handler
17
- * to a response instance
17
+ * to a response instance supported by the lower tooling (i.e. interceptors).
18
18
  */
19
19
  transformResponse?(response: MockedResponse<string>): ResponseType;
20
20
  /**
@@ -3,7 +3,7 @@ import { SerializedResponse } from '../../setupWorker/glossary';
3
3
  * Formats a mocked response for introspection in the browser's console.
4
4
  */
5
5
  export declare function prepareResponse(res: SerializedResponse<any>): {
6
- body: string | number | Record<string, any> | undefined;
6
+ body: string | number | boolean | Record<string, any> | null | undefined;
7
7
  status: number;
8
8
  statusText: string;
9
9
  headers: import("headers-utils").FlatHeadersObject;
@@ -1,5 +1,5 @@
1
1
  export declare type Path = string | RegExp;
2
- export declare type PathParams = Record<string, string | string[]>;
2
+ export declare type PathParams = Record<string, string | ReadonlyArray<string>>;
3
3
  export interface Match {
4
4
  matches: boolean;
5
5
  params?: PathParams;
@@ -2,4 +2,4 @@ import { MockedRequest } from '../../handlers/RequestHandler';
2
2
  /**
3
3
  * Parses a given request/response body based on the "Content-Type" header.
4
4
  */
5
- export declare function parseBody(body?: MockedRequest['body'], headers?: Headers): string | number | Record<string, any> | undefined;
5
+ export declare function parseBody(body?: MockedRequest['body'], headers?: Headers): string | number | boolean | Record<string, any> | null | undefined;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Determines if the given URL string is an absolute URL.
3
+ */
4
+ export declare function isAbsoluteUrl(url: string): boolean;