@torthu/jacketui-bring 0.2.0 → 0.2.2
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.
|
@@ -10,4 +10,4 @@ import { BringInitDecorator } from "../types/BringDecorator";
|
|
|
10
10
|
* @param headers A record of headers to set or a Headers object.
|
|
11
11
|
* @returns BringDecorator
|
|
12
12
|
*/
|
|
13
|
-
export declare const headers: (headers: Record<string, string> | Headers) => BringInitDecorator;
|
|
13
|
+
export declare const headers: (headers: Record<string, string | number> | Headers) => BringInitDecorator;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { BringInitDecorator } from "../types/BringDecorator";
|
|
2
1
|
import { BringInit } from "../types/BringInit";
|
|
3
2
|
/** url(string | URL): BringInitDecorator
|
|
4
3
|
*
|
|
@@ -9,4 +8,4 @@ import { BringInit } from "../types/BringInit";
|
|
|
9
8
|
* @param url - URL to request.
|
|
10
9
|
* @returns BringDecorator
|
|
11
10
|
*/
|
|
12
|
-
export declare const url: (url: BringInit["url"]) =>
|
|
11
|
+
export declare const url: (url: BringInit["url"]) => ((init?: BringInit) => BringInit);
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@ import { BringInitDecorator } from "../types/BringDecorator";
|
|
|
12
12
|
* @returns BringDecorator
|
|
13
13
|
*/
|
|
14
14
|
export const headers = (
|
|
15
|
-
headers: Record<string, string> | Headers
|
|
15
|
+
headers: Record<string, string | number> | Headers
|
|
16
16
|
): BringInitDecorator => {
|
|
17
17
|
return (init) => {
|
|
18
18
|
init.headers ??= new Headers();
|
|
@@ -11,8 +11,8 @@ import { BringInit } from "../types/BringInit";
|
|
|
11
11
|
* @returns BringDecorator
|
|
12
12
|
*/
|
|
13
13
|
export const url =
|
|
14
|
-
(url: BringInit["url"]):
|
|
15
|
-
(init) => ({
|
|
14
|
+
(url: BringInit["url"]): ((init?: BringInit) => BringInit) =>
|
|
15
|
+
(init = { url }) => ({
|
|
16
16
|
...init,
|
|
17
17
|
url,
|
|
18
18
|
});
|