@aitianyu.cn/types 0.0.11 → 0.0.13
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/lib/index.js +54 -54
- package/dist/lib/types/AreaCode.js +269 -269
- package/dist/lib/types/Exception.js +19 -19
- package/dist/lib/types/Logs.js +20 -20
- package/dist/lib/types/Object.js +3 -3
- package/dist/lib/types/PathBase.js +109 -109
- package/dist/lib/types/Security.js +10 -10
- package/dist/lib/types/TMap.js +138 -138
- package/dist/lib/types/Types.js +3 -3
- package/dist/lib/types/index.js +17 -17
- package/dist/lib/utilities/coding/Error.js +44 -44
- package/dist/lib/utilities/coding/Path.js +198 -198
- package/dist/lib/utilities/coding/index.js +10 -10
- package/dist/lib/utilities/core/Errors.js +86 -86
- package/dist/lib/utilities/core/Language.js +559 -559
- package/dist/lib/utilities/core/Log.js +108 -108
- package/dist/lib/utilities/core/TypeConvertion.js +25 -25
- package/dist/lib/utilities/core/index.js +21 -21
- package/dist/lib/utilities/core/interface/ITJSON.js +3 -0
- package/dist/lib/utilities/core/interface/ITianyuType.js +3 -0
- package/dist/lib/utilities/core/object/ArrayHelper.js +35 -35
- package/dist/lib/utilities/core/object/Calculater.js +230 -230
- package/dist/lib/utilities/core/object/Helper.js +201 -201
- package/dist/lib/utilities/core/object/StringHelper.js +22 -22
- package/dist/lib/utilities/core/type/TArray.js +7 -0
- package/dist/lib/utilities/core/type/TBoolean.js +7 -0
- package/dist/lib/utilities/core/type/TJSON.js +7 -0
- package/dist/lib/utilities/core/type/TNumber.js +7 -0
- package/dist/lib/utilities/core/type/TObject.js +7 -0
- package/dist/lib/utilities/core/type/TString.js +7 -0
- package/dist/lib/utilities/security/Guid.js +20 -20
- package/dist/lib/utilities/security/Hash.js +15 -15
- package/dist/lib/utilities/security/index.js +8 -8
- package/dist/types/index.d.ts +21 -21
- package/dist/types/types/AreaCode.d.ts +135 -135
- package/dist/types/types/Exception.d.ts +11 -11
- package/dist/types/types/Logs.d.ts +64 -64
- package/dist/types/types/Object.d.ts +18 -18
- package/dist/types/types/PathBase.d.ts +76 -76
- package/dist/types/types/Security.d.ts +23 -23
- package/dist/types/types/TMap.d.ts +80 -80
- package/dist/types/types/Types.d.ts +25 -20
- package/dist/types/types/index.d.ts +9 -9
- package/dist/types/utilities/coding/Error.d.ts +27 -27
- package/dist/types/utilities/coding/Path.d.ts +61 -61
- package/dist/types/utilities/coding/index.d.ts +3 -3
- package/dist/types/utilities/core/Errors.d.ts +47 -47
- package/dist/types/utilities/core/Language.d.ts +17 -17
- package/dist/types/utilities/core/Log.d.ts +12 -12
- package/dist/types/utilities/core/TypeConvertion.d.ts +2 -2
- package/dist/types/utilities/core/index.d.ts +6 -6
- package/dist/types/utilities/core/interface/ITJSON.d.ts +5 -0
- package/dist/types/utilities/core/interface/ITianyuType.d.ts +5 -0
- package/dist/types/utilities/core/object/ArrayHelper.d.ts +11 -11
- package/dist/types/utilities/core/object/Calculater.d.ts +22 -22
- package/dist/types/utilities/core/object/Helper.d.ts +39 -39
- package/dist/types/utilities/core/object/StringHelper.d.ts +4 -4
- package/dist/types/utilities/core/type/TArray.d.ts +3 -0
- package/dist/types/utilities/core/type/TBoolean.d.ts +3 -0
- package/dist/types/utilities/core/type/TJSON.d.ts +3 -0
- package/dist/types/utilities/core/type/TNumber.d.ts +3 -0
- package/dist/types/utilities/core/type/TObject.d.ts +3 -0
- package/dist/types/utilities/core/type/TString.d.ts +3 -0
- package/dist/types/utilities/security/Guid.d.ts +3 -3
- package/dist/types/utilities/security/Hash.d.ts +3 -3
- package/dist/types/utilities/security/index.d.ts +3 -3
- package/package.json +51 -51
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
/**@format */
|
|
2
|
-
import { IComparable } from "./Types";
|
|
3
|
-
/**
|
|
4
|
-
* Tianyu Map
|
|
5
|
-
* Support Customized Object type
|
|
6
|
-
*/
|
|
7
|
-
export declare class TMap<K extends IComparable, V> {
|
|
8
|
-
private _map;
|
|
9
|
-
private _kMap;
|
|
10
|
-
/**
|
|
11
|
-
* Create an empty Tianyu Map Instance
|
|
12
|
-
*/
|
|
13
|
-
constructor();
|
|
14
|
-
/**
|
|
15
|
-
* Clean the Map instance
|
|
16
|
-
*/
|
|
17
|
-
clear(): void;
|
|
18
|
-
/**
|
|
19
|
-
* Delete a specified item from the instance
|
|
20
|
-
*
|
|
21
|
-
* @param key The key of the item
|
|
22
|
-
* @returns return true if deleted successful and return false if failed
|
|
23
|
-
*/
|
|
24
|
-
delete(key: K): boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Executes a provided function once per each key/value pair in the Map, in insertion order.
|
|
27
|
-
*
|
|
28
|
-
* @param callbackfn provided execution function
|
|
29
|
-
* @param thisArg additional args
|
|
30
|
-
*/
|
|
31
|
-
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
|
|
32
|
-
/**
|
|
33
|
-
* Returns a specified element from the Map object. If the value that is associated to the provided key is an object,
|
|
34
|
-
* then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.
|
|
35
|
-
*
|
|
36
|
-
* @param key The key of the value
|
|
37
|
-
* @returns Returns the element associated with the specified key.
|
|
38
|
-
* If no element is associated with the specified key, undefined is returned.
|
|
39
|
-
*/
|
|
40
|
-
get(key: K): V | undefined;
|
|
41
|
-
/**
|
|
42
|
-
* Get a boolean value indicates whether an element with the specified key exists or not.
|
|
43
|
-
*
|
|
44
|
-
* @param key The key what wants to search
|
|
45
|
-
* @returns return true if the value is found
|
|
46
|
-
*/
|
|
47
|
-
has(key: K): boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.
|
|
50
|
-
*
|
|
51
|
-
* @param key The key of new element
|
|
52
|
-
* @param value The value of new element
|
|
53
|
-
* @returns return the instance that is current instance
|
|
54
|
-
*/
|
|
55
|
-
set(key: K, value: V): this;
|
|
56
|
-
/**
|
|
57
|
-
* Get a number of elements in the Map
|
|
58
|
-
*
|
|
59
|
-
* @returns return the count of elements
|
|
60
|
-
*/
|
|
61
|
-
size(): number;
|
|
62
|
-
/**
|
|
63
|
-
* Get all keys of the Map
|
|
64
|
-
*
|
|
65
|
-
* @returns return a keys iterator
|
|
66
|
-
*/
|
|
67
|
-
keys(): IterableIterator<K>;
|
|
68
|
-
/**
|
|
69
|
-
* Get all values of the Map
|
|
70
|
-
*
|
|
71
|
-
* @returns return a values iterator
|
|
72
|
-
*/
|
|
73
|
-
values(): IterableIterator<V>;
|
|
74
|
-
/**
|
|
75
|
-
* Get an Iterator of the Map
|
|
76
|
-
*
|
|
77
|
-
* @returns return an iterator object
|
|
78
|
-
*/
|
|
79
|
-
[Symbol.iterator](): Iterator<[K | undefined, V | undefined]>;
|
|
80
|
-
}
|
|
1
|
+
/**@format */
|
|
2
|
+
import { IComparable } from "./Types";
|
|
3
|
+
/**
|
|
4
|
+
* Tianyu Map
|
|
5
|
+
* Support Customized Object type
|
|
6
|
+
*/
|
|
7
|
+
export declare class TMap<K extends IComparable, V> {
|
|
8
|
+
private _map;
|
|
9
|
+
private _kMap;
|
|
10
|
+
/**
|
|
11
|
+
* Create an empty Tianyu Map Instance
|
|
12
|
+
*/
|
|
13
|
+
constructor();
|
|
14
|
+
/**
|
|
15
|
+
* Clean the Map instance
|
|
16
|
+
*/
|
|
17
|
+
clear(): void;
|
|
18
|
+
/**
|
|
19
|
+
* Delete a specified item from the instance
|
|
20
|
+
*
|
|
21
|
+
* @param key The key of the item
|
|
22
|
+
* @returns return true if deleted successful and return false if failed
|
|
23
|
+
*/
|
|
24
|
+
delete(key: K): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Executes a provided function once per each key/value pair in the Map, in insertion order.
|
|
27
|
+
*
|
|
28
|
+
* @param callbackfn provided execution function
|
|
29
|
+
* @param thisArg additional args
|
|
30
|
+
*/
|
|
31
|
+
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
|
|
32
|
+
/**
|
|
33
|
+
* Returns a specified element from the Map object. If the value that is associated to the provided key is an object,
|
|
34
|
+
* then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.
|
|
35
|
+
*
|
|
36
|
+
* @param key The key of the value
|
|
37
|
+
* @returns Returns the element associated with the specified key.
|
|
38
|
+
* If no element is associated with the specified key, undefined is returned.
|
|
39
|
+
*/
|
|
40
|
+
get(key: K): V | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Get a boolean value indicates whether an element with the specified key exists or not.
|
|
43
|
+
*
|
|
44
|
+
* @param key The key what wants to search
|
|
45
|
+
* @returns return true if the value is found
|
|
46
|
+
*/
|
|
47
|
+
has(key: K): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.
|
|
50
|
+
*
|
|
51
|
+
* @param key The key of new element
|
|
52
|
+
* @param value The value of new element
|
|
53
|
+
* @returns return the instance that is current instance
|
|
54
|
+
*/
|
|
55
|
+
set(key: K, value: V): this;
|
|
56
|
+
/**
|
|
57
|
+
* Get a number of elements in the Map
|
|
58
|
+
*
|
|
59
|
+
* @returns return the count of elements
|
|
60
|
+
*/
|
|
61
|
+
size(): number;
|
|
62
|
+
/**
|
|
63
|
+
* Get all keys of the Map
|
|
64
|
+
*
|
|
65
|
+
* @returns return a keys iterator
|
|
66
|
+
*/
|
|
67
|
+
keys(): IterableIterator<K>;
|
|
68
|
+
/**
|
|
69
|
+
* Get all values of the Map
|
|
70
|
+
*
|
|
71
|
+
* @returns return a values iterator
|
|
72
|
+
*/
|
|
73
|
+
values(): IterableIterator<V>;
|
|
74
|
+
/**
|
|
75
|
+
* Get an Iterator of the Map
|
|
76
|
+
*
|
|
77
|
+
* @returns return an iterator object
|
|
78
|
+
*/
|
|
79
|
+
[Symbol.iterator](): Iterator<[K | undefined, V | undefined]>;
|
|
80
|
+
}
|
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
/**@format */
|
|
2
|
-
/**A record object type of boolean */
|
|
3
|
-
export type MapOfBoolean = Record<string, boolean>;
|
|
4
|
-
/**A record object type of string array */
|
|
5
|
-
export type MapOfStrings = Record<string, string[]>;
|
|
6
|
-
/**A record object type of string */
|
|
7
|
-
export type MapOfString = Record<string, string>;
|
|
8
|
-
/**A record object type of customized */
|
|
9
|
-
export type MapOfType<T> = Record<string, T>;
|
|
10
|
-
/** no parameter call back function */
|
|
11
|
-
export type CallbackAction = () => void;
|
|
12
|
-
/** call back function with customized type parameter */
|
|
13
|
-
export type CallbackActionT<T> = (value: T) => void;
|
|
14
|
-
/**
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
/**@format */
|
|
2
|
+
/**A record object type of boolean */
|
|
3
|
+
export type MapOfBoolean = Record<string, boolean>;
|
|
4
|
+
/**A record object type of string array */
|
|
5
|
+
export type MapOfStrings = Record<string, string[]>;
|
|
6
|
+
/**A record object type of string */
|
|
7
|
+
export type MapOfString = Record<string, string>;
|
|
8
|
+
/**A record object type of customized */
|
|
9
|
+
export type MapOfType<T> = Record<string, T>;
|
|
10
|
+
/** no parameter call back function */
|
|
11
|
+
export type CallbackAction = () => void;
|
|
12
|
+
/** call back function with customized type parameter */
|
|
13
|
+
export type CallbackActionT<T> = (value: T) => void;
|
|
14
|
+
/** A key value pair to include a key and a value */
|
|
15
|
+
export type KeyValuePair<K, V> = {
|
|
16
|
+
key: K;
|
|
17
|
+
value: V;
|
|
18
|
+
};
|
|
19
|
+
/** Tianyu Comparable Interface */
|
|
20
|
+
export interface IComparable {
|
|
21
|
+
/** Get a string what can indicate the object unified */
|
|
22
|
+
getString(): string;
|
|
23
|
+
/** Get a number which is the hash value of the object instance */
|
|
24
|
+
getHashCode(): number;
|
|
25
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/**@format */
|
|
2
|
-
export { AreaCode } from "./AreaCode";
|
|
3
|
-
export { Exception } from "./Exception";
|
|
4
|
-
export { LogLevel, type ILog, type IPerfRecorder } from "./Logs";
|
|
5
|
-
export { type IObjectDiffInfo, type ObjectDiffMap } from "./Object";
|
|
6
|
-
export { PathBase } from "./PathBase";
|
|
7
|
-
export { EncryptOption, type ICipher } from "./Security";
|
|
8
|
-
export { TMap } from "./TMap";
|
|
9
|
-
export { type MapOfBoolean, type MapOfStrings, type MapOfString, type MapOfType, type CallbackAction, type CallbackActionT, type IComparable, } from "./Types";
|
|
1
|
+
/**@format */
|
|
2
|
+
export { AreaCode } from "./AreaCode";
|
|
3
|
+
export { Exception } from "./Exception";
|
|
4
|
+
export { LogLevel, type ILog, type IPerfRecorder } from "./Logs";
|
|
5
|
+
export { type IObjectDiffInfo, type ObjectDiffMap } from "./Object";
|
|
6
|
+
export { PathBase } from "./PathBase";
|
|
7
|
+
export { EncryptOption, type ICipher } from "./Security";
|
|
8
|
+
export { TMap } from "./TMap";
|
|
9
|
+
export { type MapOfBoolean, type MapOfStrings, type MapOfString, type MapOfType, type CallbackAction, type CallbackActionT, type IComparable, } from "./Types";
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
/**@format */
|
|
2
|
-
import { Exception } from "../../types/Exception";
|
|
3
|
-
import { PathTargetType } from "./Path";
|
|
4
|
-
/**
|
|
5
|
-
* Source lost exception of Path Processor.
|
|
6
|
-
* Exception will be thrown if the path is file but the file field is not specified
|
|
7
|
-
*/
|
|
8
|
-
export declare class PathProcessorSourceLostException extends Exception {
|
|
9
|
-
constructor(msg?: string);
|
|
10
|
-
toString(): string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Path directory name is not valid.
|
|
14
|
-
* Exception will be thrown if the path name has the invalid char
|
|
15
|
-
*/
|
|
16
|
-
export declare class PathDirectoryValidationFailException extends Exception {
|
|
17
|
-
constructor(msg?: string);
|
|
18
|
-
toString(): string;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Path is file or directory but target type is not.
|
|
22
|
-
* Exception will be thrown if the path is file(directory) but try to convert to directory(file)
|
|
23
|
-
*/
|
|
24
|
-
export declare class PathDirAndFileConvertInvaild extends Exception {
|
|
25
|
-
constructor(path: string, type: PathTargetType);
|
|
26
|
-
toString(): string;
|
|
27
|
-
}
|
|
1
|
+
/**@format */
|
|
2
|
+
import { Exception } from "../../types/Exception";
|
|
3
|
+
import { PathTargetType } from "./Path";
|
|
4
|
+
/**
|
|
5
|
+
* Source lost exception of Path Processor.
|
|
6
|
+
* Exception will be thrown if the path is file but the file field is not specified
|
|
7
|
+
*/
|
|
8
|
+
export declare class PathProcessorSourceLostException extends Exception {
|
|
9
|
+
constructor(msg?: string);
|
|
10
|
+
toString(): string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Path directory name is not valid.
|
|
14
|
+
* Exception will be thrown if the path name has the invalid char
|
|
15
|
+
*/
|
|
16
|
+
export declare class PathDirectoryValidationFailException extends Exception {
|
|
17
|
+
constructor(msg?: string);
|
|
18
|
+
toString(): string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Path is file or directory but target type is not.
|
|
22
|
+
* Exception will be thrown if the path is file(directory) but try to convert to directory(file)
|
|
23
|
+
*/
|
|
24
|
+
export declare class PathDirAndFileConvertInvaild extends Exception {
|
|
25
|
+
constructor(path: string, type: PathTargetType);
|
|
26
|
+
toString(): string;
|
|
27
|
+
}
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
/**@format */
|
|
2
|
-
import { PathBase } from "../../types/PathBase";
|
|
3
|
-
import { IComparable } from "../../types/Types";
|
|
4
|
-
/** The target path type */
|
|
5
|
-
export type PathTargetType = "directory" | "file";
|
|
6
|
-
/** Path */
|
|
7
|
-
export declare class Path extends PathBase implements IComparable {
|
|
8
|
-
private _type;
|
|
9
|
-
private _file?;
|
|
10
|
-
/**
|
|
11
|
-
* Create a new Path instance
|
|
12
|
-
*
|
|
13
|
-
* @param dirs the directory names
|
|
14
|
-
* @param type indicate which type the Path is
|
|
15
|
-
* @param file the file name if the type is file
|
|
16
|
-
*/
|
|
17
|
-
constructor(dirs?: string[] | string, type?: PathTargetType, file?: string);
|
|
18
|
-
/**
|
|
19
|
-
* Convert the path to a string
|
|
20
|
-
*
|
|
21
|
-
* @returns return the string
|
|
22
|
-
*/
|
|
23
|
-
toString(): string;
|
|
24
|
-
/**
|
|
25
|
-
* Set the target type
|
|
26
|
-
*
|
|
27
|
-
* @param type new type
|
|
28
|
-
*/
|
|
29
|
-
setType(type: PathTargetType): void;
|
|
30
|
-
/**
|
|
31
|
-
* Get the path type of current instance
|
|
32
|
-
*
|
|
33
|
-
* @returns return the path type
|
|
34
|
-
*/
|
|
35
|
-
getType(): PathTargetType;
|
|
36
|
-
/**
|
|
37
|
-
* Set the path file name
|
|
38
|
-
*
|
|
39
|
-
* @param file the new file name
|
|
40
|
-
* @returns return the old file name
|
|
41
|
-
*/
|
|
42
|
-
setFile(file: string): string | undefined;
|
|
43
|
-
/**
|
|
44
|
-
* Get the file name of current instance
|
|
45
|
-
*
|
|
46
|
-
* @returns return the file name
|
|
47
|
-
*/
|
|
48
|
-
getFile(): string | undefined;
|
|
49
|
-
/**
|
|
50
|
-
* IComparable impl to get a string what equals to current instance
|
|
51
|
-
*
|
|
52
|
-
* @returns return the string
|
|
53
|
-
*/
|
|
54
|
-
getString(): string;
|
|
55
|
-
/**
|
|
56
|
-
* Get a hash code of current instance
|
|
57
|
-
*
|
|
58
|
-
* @returns always return 0
|
|
59
|
-
*/
|
|
60
|
-
getHashCode(): number;
|
|
61
|
-
}
|
|
1
|
+
/**@format */
|
|
2
|
+
import { PathBase } from "../../types/PathBase";
|
|
3
|
+
import { IComparable } from "../../types/Types";
|
|
4
|
+
/** The target path type */
|
|
5
|
+
export type PathTargetType = "directory" | "file";
|
|
6
|
+
/** Path */
|
|
7
|
+
export declare class Path extends PathBase implements IComparable {
|
|
8
|
+
private _type;
|
|
9
|
+
private _file?;
|
|
10
|
+
/**
|
|
11
|
+
* Create a new Path instance
|
|
12
|
+
*
|
|
13
|
+
* @param dirs the directory names
|
|
14
|
+
* @param type indicate which type the Path is
|
|
15
|
+
* @param file the file name if the type is file
|
|
16
|
+
*/
|
|
17
|
+
constructor(dirs?: string[] | string, type?: PathTargetType, file?: string);
|
|
18
|
+
/**
|
|
19
|
+
* Convert the path to a string
|
|
20
|
+
*
|
|
21
|
+
* @returns return the string
|
|
22
|
+
*/
|
|
23
|
+
toString(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Set the target type
|
|
26
|
+
*
|
|
27
|
+
* @param type new type
|
|
28
|
+
*/
|
|
29
|
+
setType(type: PathTargetType): void;
|
|
30
|
+
/**
|
|
31
|
+
* Get the path type of current instance
|
|
32
|
+
*
|
|
33
|
+
* @returns return the path type
|
|
34
|
+
*/
|
|
35
|
+
getType(): PathTargetType;
|
|
36
|
+
/**
|
|
37
|
+
* Set the path file name
|
|
38
|
+
*
|
|
39
|
+
* @param file the new file name
|
|
40
|
+
* @returns return the old file name
|
|
41
|
+
*/
|
|
42
|
+
setFile(file: string): string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Get the file name of current instance
|
|
45
|
+
*
|
|
46
|
+
* @returns return the file name
|
|
47
|
+
*/
|
|
48
|
+
getFile(): string | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* IComparable impl to get a string what equals to current instance
|
|
51
|
+
*
|
|
52
|
+
* @returns return the string
|
|
53
|
+
*/
|
|
54
|
+
getString(): string;
|
|
55
|
+
/**
|
|
56
|
+
* Get a hash code of current instance
|
|
57
|
+
*
|
|
58
|
+
* @returns always return 0
|
|
59
|
+
*/
|
|
60
|
+
getHashCode(): number;
|
|
61
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/**@format */
|
|
2
|
-
export { PathProcessorSourceLostException, PathDirectoryValidationFailException, PathDirAndFileConvertInvaild } from "./Error";
|
|
3
|
-
export { type PathTargetType, Path } from "./Path";
|
|
1
|
+
/**@format */
|
|
2
|
+
export { PathProcessorSourceLostException, PathDirectoryValidationFailException, PathDirAndFileConvertInvaild } from "./Error";
|
|
3
|
+
export { type PathTargetType, Path } from "./Path";
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
/**@format */
|
|
2
|
-
import { Exception } from "../../types/Exception";
|
|
3
|
-
/** Argument null exception */
|
|
4
|
-
export declare class ArgumentNullOrEmptyException extends Exception {
|
|
5
|
-
constructor(msg: string);
|
|
6
|
-
toString(): string;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Object Clone:
|
|
10
|
-
* Function type is not supported.
|
|
11
|
-
* Exception will be thrown if try to clone a function type object
|
|
12
|
-
*/
|
|
13
|
-
export declare class ObjectCloneFunctionNotSupportException extends Exception {
|
|
14
|
-
constructor();
|
|
15
|
-
toString(): string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Object Clone:
|
|
19
|
-
* Object different status could not be matched.
|
|
20
|
-
* Exception will be thrown if the object diff could not to be merged
|
|
21
|
-
*/
|
|
22
|
-
export declare class ObjectMergeStatusCheckFailedException extends Exception {
|
|
23
|
-
private status;
|
|
24
|
-
private path;
|
|
25
|
-
constructor(path: string, status: "add" | "modify" | "del");
|
|
26
|
-
toString(): string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Object Clone:
|
|
30
|
-
* Object different status could not be applied.
|
|
31
|
-
* Exception will be thrown if the object diff could not to be applied
|
|
32
|
-
*/
|
|
33
|
-
export declare class ObjectDiffApplyInvalidStatusException extends Exception {
|
|
34
|
-
private value;
|
|
35
|
-
constructor(value: any);
|
|
36
|
-
toString(): string;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Object Clone:
|
|
40
|
-
* Object different merge failed.
|
|
41
|
-
* Exception will be thrown if the object element could not be accessed
|
|
42
|
-
*/
|
|
43
|
-
export declare class ObjectDiffMergeFailedException extends Exception {
|
|
44
|
-
private path;
|
|
45
|
-
constructor(path: string);
|
|
46
|
-
toString(): string;
|
|
47
|
-
}
|
|
1
|
+
/**@format */
|
|
2
|
+
import { Exception } from "../../types/Exception";
|
|
3
|
+
/** Argument null exception */
|
|
4
|
+
export declare class ArgumentNullOrEmptyException extends Exception {
|
|
5
|
+
constructor(msg: string);
|
|
6
|
+
toString(): string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Object Clone:
|
|
10
|
+
* Function type is not supported.
|
|
11
|
+
* Exception will be thrown if try to clone a function type object
|
|
12
|
+
*/
|
|
13
|
+
export declare class ObjectCloneFunctionNotSupportException extends Exception {
|
|
14
|
+
constructor();
|
|
15
|
+
toString(): string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Object Clone:
|
|
19
|
+
* Object different status could not be matched.
|
|
20
|
+
* Exception will be thrown if the object diff could not to be merged
|
|
21
|
+
*/
|
|
22
|
+
export declare class ObjectMergeStatusCheckFailedException extends Exception {
|
|
23
|
+
private status;
|
|
24
|
+
private path;
|
|
25
|
+
constructor(path: string, status: "add" | "modify" | "del");
|
|
26
|
+
toString(): string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Object Clone:
|
|
30
|
+
* Object different status could not be applied.
|
|
31
|
+
* Exception will be thrown if the object diff could not to be applied
|
|
32
|
+
*/
|
|
33
|
+
export declare class ObjectDiffApplyInvalidStatusException extends Exception {
|
|
34
|
+
private value;
|
|
35
|
+
constructor(value: any);
|
|
36
|
+
toString(): string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Object Clone:
|
|
40
|
+
* Object different merge failed.
|
|
41
|
+
* Exception will be thrown if the object element could not be accessed
|
|
42
|
+
*/
|
|
43
|
+
export declare class ObjectDiffMergeFailedException extends Exception {
|
|
44
|
+
private path;
|
|
45
|
+
constructor(path: string);
|
|
46
|
+
toString(): string;
|
|
47
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**@format */
|
|
2
|
-
import { AreaCode } from "../../types/AreaCode";
|
|
3
|
-
/**
|
|
4
|
-
* Parse area code to general string
|
|
5
|
-
*
|
|
6
|
-
* @param eArea the area code
|
|
7
|
-
* @returns return the general string of specified area code
|
|
8
|
-
*/
|
|
9
|
-
export declare function parseAreaCode(eArea: AreaCode): string;
|
|
10
|
-
/**
|
|
11
|
-
* Convert the string to area code
|
|
12
|
-
*
|
|
13
|
-
* @param areaStr the source string
|
|
14
|
-
* @param forceArea a boolean value indicates whether needs to have a strict check for the source string. (That means if in strict mode and the string could not be converted, an unkonwn will be returned.)
|
|
15
|
-
* @returns return the area code
|
|
16
|
-
*/
|
|
17
|
-
export declare function parseAreaString(areaStr?: string, forceArea?: boolean): AreaCode;
|
|
1
|
+
/**@format */
|
|
2
|
+
import { AreaCode } from "../../types/AreaCode";
|
|
3
|
+
/**
|
|
4
|
+
* Parse area code to general string
|
|
5
|
+
*
|
|
6
|
+
* @param eArea the area code
|
|
7
|
+
* @returns return the general string of specified area code
|
|
8
|
+
*/
|
|
9
|
+
export declare function parseAreaCode(eArea: AreaCode): string;
|
|
10
|
+
/**
|
|
11
|
+
* Convert the string to area code
|
|
12
|
+
*
|
|
13
|
+
* @param areaStr the source string
|
|
14
|
+
* @param forceArea a boolean value indicates whether needs to have a strict check for the source string. (That means if in strict mode and the string could not be converted, an unkonwn will be returned.)
|
|
15
|
+
* @returns return the area code
|
|
16
|
+
*/
|
|
17
|
+
export declare function parseAreaString(areaStr?: string, forceArea?: boolean): AreaCode;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/**@format */
|
|
2
|
-
import { ILog, IPerfRecorder } from "../../types/Logs";
|
|
3
|
-
declare function _startPerf(id?: string): IPerfRecorder;
|
|
4
|
-
declare function _endPerf(recorder: IPerfRecorder, console?: boolean): number;
|
|
5
|
-
/** Tianyu Log Instance */
|
|
6
|
-
export declare const Log: ILog;
|
|
7
|
-
/** Tianyu Performance Instance */
|
|
8
|
-
export declare const Performance: {
|
|
9
|
-
startPerf: typeof _startPerf;
|
|
10
|
-
endPerf: typeof _endPerf;
|
|
11
|
-
};
|
|
12
|
-
export {};
|
|
1
|
+
/**@format */
|
|
2
|
+
import { ILog, IPerfRecorder } from "../../types/Logs";
|
|
3
|
+
declare function _startPerf(id?: string): IPerfRecorder;
|
|
4
|
+
declare function _endPerf(recorder: IPerfRecorder, console?: boolean): number;
|
|
5
|
+
/** Tianyu Log Instance */
|
|
6
|
+
export declare const Log: ILog;
|
|
7
|
+
/** Tianyu Performance Instance */
|
|
8
|
+
export declare const Performance: {
|
|
9
|
+
startPerf: typeof _startPerf;
|
|
10
|
+
endPerf: typeof _endPerf;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/**@format */
|
|
2
|
-
export declare function getBoolean(value: any): boolean;
|
|
1
|
+
/**@format */
|
|
2
|
+
export declare function getBoolean(value: any): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/**@format */
|
|
2
|
-
export { ArgumentNullOrEmptyException, ObjectCloneFunctionNotSupportException, ObjectMergeStatusCheckFailedException, ObjectDiffApplyInvalidStatusException, ObjectDiffMergeFailedException, } from "./Errors";
|
|
3
|
-
export { parseAreaCode, parseAreaString } from "./Language";
|
|
4
|
-
export { Log, Performance } from "./Log";
|
|
5
|
-
export { ObjectCalculater } from "./object/Calculater";
|
|
6
|
-
export { ObjectHelper } from "./object/Helper";
|
|
1
|
+
/**@format */
|
|
2
|
+
export { ArgumentNullOrEmptyException, ObjectCloneFunctionNotSupportException, ObjectMergeStatusCheckFailedException, ObjectDiffApplyInvalidStatusException, ObjectDiffMergeFailedException, } from "./Errors";
|
|
3
|
+
export { parseAreaCode, parseAreaString } from "./Language";
|
|
4
|
+
export { Log, Performance } from "./Log";
|
|
5
|
+
export { ObjectCalculater } from "./object/Calculater";
|
|
6
|
+
export { ObjectHelper } from "./object/Helper";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**@format */
|
|
2
|
-
/** Array type related tools */
|
|
3
|
-
export declare class ArrayHelper {
|
|
4
|
-
/**
|
|
5
|
-
* To merge multiple arrays into a new array and remove duplicated elements.
|
|
6
|
-
*
|
|
7
|
-
* @param {any[]} array arrays
|
|
8
|
-
* @returns return a new array
|
|
9
|
-
*/
|
|
10
|
-
static merge(...array: any[]): any[];
|
|
11
|
-
}
|
|
1
|
+
/**@format */
|
|
2
|
+
/** Array type related tools */
|
|
3
|
+
export declare class ArrayHelper {
|
|
4
|
+
/**
|
|
5
|
+
* To merge multiple arrays into a new array and remove duplicated elements.
|
|
6
|
+
*
|
|
7
|
+
* @param {any[]} array arrays
|
|
8
|
+
* @returns return a new array
|
|
9
|
+
*/
|
|
10
|
+
static merge(...array: any[]): any[];
|
|
11
|
+
}
|