@putkoff/abstract-utilities 0.1.207 → 0.1.209
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/dist/cjs/index.js +12 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +12 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/types/functions/fetch_utils/src/fetch_utils.d.ts +2 -2
- package/dist/types/functions/fetch_utils/src/utils.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -192,8 +192,8 @@ declare function get_window_location(): Location | "https://abstractendeavors.co
|
|
|
192
192
|
declare function get_window_pathname(): string | null;
|
|
193
193
|
declare function get_window_parts(): Location | "https://abstractendeavors.com" | null;
|
|
194
194
|
|
|
195
|
-
declare function fetchIt<T>(url: any, body?: any, method?: any, headers?: Record<string, string> | null, blob?: boolean, configUrl?: boolean, withCredentials?: boolean, returnJson?: boolean,
|
|
196
|
-
declare function fetchIt(url: any, body?: any, method?: any, headers?: Record<string, string> | null, blob?: boolean, configUrl?: boolean, withCredentials?: boolean, returnJson?: boolean,
|
|
195
|
+
declare function fetchIt<T>(url: any, body?: any, method?: any, headers?: Record<string, string> | null, blob?: boolean, configUrl?: boolean, withCredentials?: boolean, returnJson?: boolean, returnResult?: boolean): Promise<T>;
|
|
196
|
+
declare function fetchIt(url: any, body?: any, method?: any, headers?: Record<string, string> | null, blob?: boolean, configUrl?: boolean, withCredentials?: boolean, returnJson?: boolean, returnResult?: boolean): Promise<Blob>;
|
|
197
197
|
declare function getHtmlDirectory(directory: string, filename: string): string;
|
|
198
198
|
declare function fetchIndexHtml(filename: string, directory?: string, base?: string): Promise<string>;
|
|
199
199
|
declare function fetchIndexHtmlContainer(filename: string, doc?: Document, directory?: string): Promise<void>;
|
|
@@ -210,7 +210,7 @@ declare function getConfigVar<T = any>(key?: any): Promise<T | undefined>;
|
|
|
210
210
|
/**
|
|
211
211
|
* Unwraps nested { result } fields until you hit a non-object or no more "result" keys.
|
|
212
212
|
*/
|
|
213
|
-
declare function getResult<T>(obj:
|
|
213
|
+
declare function getResult<T>(obj: any): T;
|
|
214
214
|
declare function getMethod(method?: string | null, body?: unknown): string;
|
|
215
215
|
declare function getHeaders(headers?: Record<string, string>, method?: string | null, body?: unknown): Record<string, string>;
|
|
216
216
|
declare function getBody(body?: unknown, method?: string | null): string | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare function fetchIt<T>(url: any, body?: any, method?: any, headers?: Record<string, string> | null, blob?: boolean, configUrl?: boolean, withCredentials?: boolean, returnJson?: boolean,
|
|
2
|
-
export declare function fetchIt(url: any, body?: any, method?: any, headers?: Record<string, string> | null, blob?: boolean, configUrl?: boolean, withCredentials?: boolean, returnJson?: boolean,
|
|
1
|
+
export declare function fetchIt<T>(url: any, body?: any, method?: any, headers?: Record<string, string> | null, blob?: boolean, configUrl?: boolean, withCredentials?: boolean, returnJson?: boolean, returnResult?: boolean): Promise<T>;
|
|
2
|
+
export declare function fetchIt(url: any, body?: any, method?: any, headers?: Record<string, string> | null, blob?: boolean, configUrl?: boolean, withCredentials?: boolean, returnJson?: boolean, returnResult?: boolean): Promise<Blob>;
|
|
3
3
|
export declare function getHtmlDirectory(directory: string, filename: string): string;
|
|
4
4
|
export declare function fetchIndexHtml(filename: string, directory?: string, base?: string): Promise<string>;
|
|
5
5
|
export declare function fetchIndexHtmlContainer(filename: string, doc?: Document, directory?: string): Promise<void>;
|
|
@@ -2,7 +2,7 @@ import { FetchVariables } from './../imports';
|
|
|
2
2
|
/**
|
|
3
3
|
* Unwraps nested { result } fields until you hit a non-object or no more "result" keys.
|
|
4
4
|
*/
|
|
5
|
-
export declare function getResult<T>(obj:
|
|
5
|
+
export declare function getResult<T>(obj: any): T;
|
|
6
6
|
export declare function getMethod(method?: string | null, body?: unknown): string;
|
|
7
7
|
export declare function getHeaders(headers?: Record<string, string>, method?: string | null, body?: unknown): Record<string, string>;
|
|
8
8
|
export declare function getBody(body?: unknown, method?: string | null): string | undefined;
|