@nano-lib/util 1.1.2 → 1.1.3
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/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.mjs +463 -445
- package/lib/utils/common.d.ts +7 -1
- package/package.json +1 -1
package/lib/utils/common.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PromiseFn, Fn, ProtocolType } from '../types';
|
|
1
|
+
import { PromiseFn, Nullable, Fn, ProtocolType, AnyObj } from '../types';
|
|
2
2
|
export declare const NOOP: () => void;
|
|
3
3
|
export declare function sleep(x: number): Promise<unknown>;
|
|
4
4
|
export declare function countdownTimer(x: number, cb: (x: number) => void | undefined): Promise<boolean>;
|
|
@@ -18,6 +18,12 @@ export declare function getGenderByIdNumber(idNumber: string): "1" | "2";
|
|
|
18
18
|
* @throws error if the given ID number is invalid
|
|
19
19
|
*/
|
|
20
20
|
export declare function getBirthdayByIdNumber(idNumber: string): string;
|
|
21
|
+
export declare function getSystemConfig<T extends AnyObj, U>(options: {
|
|
22
|
+
baseUrl: Nullable<string> | Fn<Nullable<string>>;
|
|
23
|
+
initUrl: string;
|
|
24
|
+
initParams?: T;
|
|
25
|
+
initFn: (initUrl: string, initParams: T) => Promise<U>;
|
|
26
|
+
}): Promise<boolean | U>;
|
|
21
27
|
/**
|
|
22
28
|
* Gets the current location configuration.
|
|
23
29
|
* @param httpsPort the port for HTTPS protocol, default is '443'
|