ngx-uploadx
Version:
Angular Resumable Upload Module
41 lines (40 loc) • 1.44 kB
TypeScript
export declare function resolveUrl(url: string, base: string): string;
/**
* Unwraps a value if it is a function, otherwise returns the value directly.
* Useful for allowing values to optionally be specified as functions.
*/
export declare function unfunc<T, V>(value: T | ((ref: V) => T), ref: V): T;
export declare const pick: <T, K extends keyof T>(obj: T, props: K[]) => Pick<T, K>;
export declare function isNumber(x?: unknown): x is number;
/**
* 32-bit FNV-1a hash function
*/
export declare function createHash(str: string): number;
/**
* Utility functions for base64 encoding and decoding strings and objects.
*/
export declare const b64: {
encode: (str: string) => string;
decode: (str: string) => string;
serialize: (obj: Record<string, unknown>) => string;
parse: (encoded: string) => Record<string, string>;
};
export declare function isBrowser(): boolean;
export declare function onLine(): boolean;
export declare function isIOS(): boolean;
export declare function osVersion(): string;
export declare function compareVersions(a: string, b: string): number;
export declare function isBadIOS(): boolean;
/**
* [Big files upload error with iOS](https://github.com/kukhariev/ngx-uploadx/issues/316)
* TODO: move to app
*/
export declare const iosOverride: {
chunkSize: number;
retryConfig: {
shouldRetry: () => boolean;
};
} | {
chunkSize?: undefined;
retryConfig?: undefined;
};