typescript-class-helpers 13.2.12 → 13.2.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/assets/shared/shared_folder_info.txt +1 -1
- package/browser/README.md +24 -24
- package/browser/esm2020/lib/classname.mjs +150 -150
- package/browser/esm2020/lib/describe-class.mjs +71 -71
- package/browser/esm2020/lib/errors-messages.mjs +3 -3
- package/browser/esm2020/lib/index.mjs +134 -134
- package/browser/esm2020/lib/models.mjs +26 -26
- package/browser/esm2020/lib/registerd-db.mjs +5 -5
- package/browser/esm2020/lib/set-class-name.mjs +89 -89
- package/browser/esm2020/lib/storage.mjs +23 -23
- package/browser/esm2020/lib/symbols.mjs +7 -7
- package/browser/esm2020/public-api.mjs +1 -1
- package/browser/esm2020/typescript-class-helpers.mjs +4 -4
- package/browser/fesm2015/typescript-class-helpers.mjs +476 -476
- package/browser/fesm2020/typescript-class-helpers.mjs +476 -476
- package/browser/lib/classname.d.ts +15 -15
- package/browser/lib/describe-class.d.ts +5 -5
- package/browser/lib/index.d.ts +32 -32
- package/browser/lib/models.d.ts +66 -66
- package/browser/lib/registerd-db.d.ts +4 -4
- package/browser/lib/set-class-name.d.ts +1 -1
- package/browser/lib/symbols.d.ts +5 -5
- package/browser/typescript-class-helpers.d.ts +4 -4
- package/client/README.md +24 -24
- package/client/esm2020/lib/classname.mjs +150 -150
- package/client/esm2020/lib/describe-class.mjs +71 -71
- package/client/esm2020/lib/errors-messages.mjs +3 -3
- package/client/esm2020/lib/index.mjs +134 -134
- package/client/esm2020/lib/models.mjs +26 -26
- package/client/esm2020/lib/registerd-db.mjs +5 -5
- package/client/esm2020/lib/set-class-name.mjs +89 -89
- package/client/esm2020/lib/storage.mjs +23 -23
- package/client/esm2020/lib/symbols.mjs +7 -7
- package/client/esm2020/public-api.mjs +1 -1
- package/client/esm2020/typescript-class-helpers.mjs +4 -4
- package/client/fesm2015/typescript-class-helpers.mjs +476 -476
- package/client/fesm2020/typescript-class-helpers.mjs +476 -476
- package/client/lib/classname.d.ts +15 -15
- package/client/lib/describe-class.d.ts +5 -5
- package/client/lib/index.d.ts +32 -32
- package/client/lib/models.d.ts +66 -66
- package/client/lib/registerd-db.d.ts +4 -4
- package/client/lib/set-class-name.d.ts +1 -1
- package/client/lib/symbols.d.ts +5 -5
- package/client/package.json +33 -31
- package/client/typescript-class-helpers.d.ts +4 -4
- package/index.d.ts +1 -1
- package/index.js.map +1 -1
- package/lib/classname.d.ts +16 -16
- package/lib/classname.js.map +1 -1
- package/lib/describe-class.d.ts +6 -6
- package/lib/describe-class.js.map +1 -1
- package/lib/errors-messages.d.ts +1 -1
- package/lib/errors-messages.js.map +1 -1
- package/lib/index.d.ts +33 -33
- package/lib/index.js.map +1 -1
- package/lib/models.d.ts +68 -68
- package/lib/models.js.map +1 -1
- package/lib/registerd-db.d.ts +5 -5
- package/lib/registerd-db.js.map +1 -1
- package/lib/set-class-name.d.ts +2 -2
- package/lib/set-class-name.js.map +1 -1
- package/lib/storage.d.ts +1 -1
- package/lib/storage.js.map +1 -1
- package/lib/symbols.d.ts +6 -6
- package/lib/symbols.js.map +1 -1
- package/package.json +3 -3
- package/package.json_devDependencies.json +223 -223
- package/package.json_tnp.json5 +51 -51
- package/tmp-environment.json +37 -35
- package/websql/README.md +24 -24
- package/websql/esm2020/lib/classname.mjs +150 -150
- package/websql/esm2020/lib/describe-class.mjs +71 -71
- package/websql/esm2020/lib/errors-messages.mjs +3 -3
- package/websql/esm2020/lib/index.mjs +134 -134
- package/websql/esm2020/lib/models.mjs +24 -24
- package/websql/esm2020/lib/registerd-db.mjs +5 -5
- package/websql/esm2020/lib/set-class-name.mjs +89 -89
- package/websql/esm2020/lib/storage.mjs +23 -23
- package/websql/esm2020/lib/symbols.mjs +7 -7
- package/websql/esm2020/public-api.mjs +1 -1
- package/websql/esm2020/typescript-class-helpers.mjs +4 -4
- package/websql/fesm2015/typescript-class-helpers.mjs +474 -474
- package/websql/fesm2020/typescript-class-helpers.mjs +474 -474
- package/websql/lib/classname.d.ts +15 -15
- package/websql/lib/describe-class.d.ts +5 -5
- package/websql/lib/index.d.ts +32 -32
- package/websql/lib/models.d.ts +67 -67
- package/websql/lib/registerd-db.d.ts +4 -4
- package/websql/lib/set-class-name.d.ts +1 -1
- package/websql/lib/symbols.d.ts +5 -5
- package/websql/typescript-class-helpers.d.ts +4 -4
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import { Models } from './models';
|
|
3
|
-
export declare namespace CLASSNAME {
|
|
4
|
-
function getClassConfig(target: Function, configs?: Models.ClassConfig[], callerTarget?: Function): Models.ClassConfig[];
|
|
5
|
-
/**
|
|
6
|
-
* PLEASE PROVIDE NAME AS TYPED STRING, NOT VARIABLE
|
|
7
|
-
* Decorator requred for production mode
|
|
8
|
-
* @param name Name of class
|
|
9
|
-
*/
|
|
10
|
-
function CLASSNAME(className: string, options?: Models.CLASSNAMEOptions): any;
|
|
11
|
-
function getClassName(target: Function, production?: boolean): string;
|
|
12
|
-
function getObjectIndexPropertyValue(obj: any): string;
|
|
13
|
-
function getClassFamilyByClassName(className: string): string;
|
|
14
|
-
function getObjectClassFamily(obj: any): string;
|
|
15
|
-
function getObjectIndexValue(obj: any): any;
|
|
16
|
-
function getClassBy(className: string | Function): Function;
|
|
2
|
+
import { Models } from './models';
|
|
3
|
+
export declare namespace CLASSNAME {
|
|
4
|
+
function getClassConfig(target: Function, configs?: Models.ClassConfig[], callerTarget?: Function): Models.ClassConfig[];
|
|
5
|
+
/**
|
|
6
|
+
* PLEASE PROVIDE NAME AS TYPED STRING, NOT VARIABLE
|
|
7
|
+
* Decorator requred for production mode
|
|
8
|
+
* @param name Name of class
|
|
9
|
+
*/
|
|
10
|
+
function CLASSNAME(className: string, options?: Models.CLASSNAMEOptions): any;
|
|
11
|
+
function getClassName(target: Function, production?: boolean): string;
|
|
12
|
+
function getObjectIndexPropertyValue(obj: any): string;
|
|
13
|
+
function getClassFamilyByClassName(className: string): string;
|
|
14
|
+
function getObjectClassFamily(obj: any): string;
|
|
15
|
+
function getObjectIndexValue(obj: any): any;
|
|
16
|
+
function getClassBy(className: string | Function): Function;
|
|
17
17
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
export declare function describeFromClassStringify(target: Function, parent?: boolean): string[];
|
|
3
|
-
/**
|
|
4
|
-
* Describe fields assigne through @DefaultModelWithMapping decorator
|
|
5
|
-
* without functions
|
|
6
|
-
*/
|
|
2
|
+
export declare function describeFromClassStringify(target: Function, parent?: boolean): string[];
|
|
3
|
+
/**
|
|
4
|
+
* Describe fields assigne through @DefaultModelWithMapping decorator
|
|
5
|
+
* without functions
|
|
6
|
+
*/
|
|
7
7
|
export declare function describeByDefaultModelsAndMapping(target: Function): string[];
|
package/websql/lib/index.d.ts
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import { CLASSNAME } from './classname';
|
|
3
|
-
import { Models } from './models';
|
|
4
|
-
import { setClassName } from './set-class-name';
|
|
5
|
-
export { Models } from './models';
|
|
6
|
-
export { SYMBOL } from './symbols';
|
|
7
|
-
export declare class TchHelpers {
|
|
8
|
-
static getBy(className: string | Function): Function;
|
|
9
|
-
static getFromObject(o: Object): any;
|
|
10
|
-
static getName(target: Function, production?: boolean): string;
|
|
11
|
-
static getNameFromObject(o: Object): string;
|
|
12
|
-
static getConfigs(target: Function): Models.ClassConfig[];
|
|
13
|
-
static describeProperites(target: Function): string[];
|
|
14
|
-
}
|
|
15
|
-
export declare const CLASS: {
|
|
16
|
-
NAME: typeof CLASSNAME.CLASSNAME;
|
|
17
|
-
setName: typeof setClassName;
|
|
18
|
-
getBy: typeof TchHelpers.getBy;
|
|
19
|
-
getSingleton<T = any>(target: Function): T;
|
|
20
|
-
setSingletonObj(target: Function, singletonObject: any): void;
|
|
21
|
-
getConfigs: typeof TchHelpers.getConfigs;
|
|
22
|
-
getConfig: (target: Function) => Models.ClassConfig;
|
|
23
|
-
getFromObject: typeof TchHelpers.getFromObject;
|
|
24
|
-
getName: typeof TchHelpers.getName;
|
|
25
|
-
getNameFromObject: typeof TchHelpers.getNameFromObject;
|
|
26
|
-
describeProperites: typeof TchHelpers.describeProperites;
|
|
27
|
-
OBJECT: (obj: any) => {
|
|
28
|
-
readonly indexValue: any;
|
|
29
|
-
readonly indexProperty: string;
|
|
30
|
-
readonly isClassObject: boolean;
|
|
31
|
-
isEqual: (anotherObj: any, compareDeep?: boolean) => boolean;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
2
|
+
import { CLASSNAME } from './classname';
|
|
3
|
+
import { Models } from './models';
|
|
4
|
+
import { setClassName } from './set-class-name';
|
|
5
|
+
export { Models } from './models';
|
|
6
|
+
export { SYMBOL } from './symbols';
|
|
7
|
+
export declare class TchHelpers {
|
|
8
|
+
static getBy(className: string | Function): Function;
|
|
9
|
+
static getFromObject(o: Object): any;
|
|
10
|
+
static getName(target: Function, production?: boolean): string;
|
|
11
|
+
static getNameFromObject(o: Object): string;
|
|
12
|
+
static getConfigs(target: Function): Models.ClassConfig[];
|
|
13
|
+
static describeProperites(target: Function): string[];
|
|
14
|
+
}
|
|
15
|
+
export declare const CLASS: {
|
|
16
|
+
NAME: typeof CLASSNAME.CLASSNAME;
|
|
17
|
+
setName: typeof setClassName;
|
|
18
|
+
getBy: typeof TchHelpers.getBy;
|
|
19
|
+
getSingleton<T = any>(target: Function): T;
|
|
20
|
+
setSingletonObj(target: Function, singletonObject: any): void;
|
|
21
|
+
getConfigs: typeof TchHelpers.getConfigs;
|
|
22
|
+
getConfig: (target: Function) => Models.ClassConfig;
|
|
23
|
+
getFromObject: typeof TchHelpers.getFromObject;
|
|
24
|
+
getName: typeof TchHelpers.getName;
|
|
25
|
+
getNameFromObject: typeof TchHelpers.getNameFromObject;
|
|
26
|
+
describeProperites: typeof TchHelpers.describeProperites;
|
|
27
|
+
OBJECT: (obj: any) => {
|
|
28
|
+
readonly indexValue: any;
|
|
29
|
+
readonly indexProperty: string;
|
|
30
|
+
readonly isClassObject: boolean;
|
|
31
|
+
isEqual: (anotherObj: any, compareDeep?: boolean) => boolean;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
34
|
export * from 'enum-values';
|
package/websql/lib/models.d.ts
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import { ConfigModels } from 'tnp-config/websql';
|
|
3
|
-
export declare namespace Models {
|
|
4
|
-
type CLASSNAMEOptions = {
|
|
5
|
-
uniqueKey?: string;
|
|
6
|
-
/**
|
|
7
|
-
* autoinstance - create instance of singleton automaticly inside decorator
|
|
8
|
-
* first-instance - use first instace of created class as decorator
|
|
9
|
-
*/
|
|
10
|
-
singleton?: 'autoinstance' | 'first-instance' | 'last-instance' | boolean;
|
|
11
|
-
classFamily?: string;
|
|
12
|
-
classNameInBrowser?: string;
|
|
13
|
-
};
|
|
14
|
-
class ParamConfig {
|
|
15
|
-
paramName: string;
|
|
16
|
-
paramType: ConfigModels.ParamType;
|
|
17
|
-
index: number;
|
|
18
|
-
defaultType: any;
|
|
19
|
-
expireInSeconds?: number;
|
|
20
|
-
}
|
|
21
|
-
class MethodConfig {
|
|
22
|
-
methodName: string;
|
|
23
|
-
/**
|
|
24
|
-
* path is global in express app
|
|
25
|
-
*/
|
|
26
|
-
global?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* override default content type
|
|
29
|
-
*/
|
|
30
|
-
contentType?: any;
|
|
31
|
-
/**
|
|
32
|
-
* override default axiso response type
|
|
33
|
-
*/
|
|
34
|
-
responseType?: any;
|
|
35
|
-
path: string;
|
|
36
|
-
descriptor: PropertyDescriptor;
|
|
37
|
-
type: ConfigModels.HttpMethod;
|
|
38
|
-
requestHandler: any;
|
|
39
|
-
parameters: {
|
|
40
|
-
[paramName: string]: ParamConfig;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
interface ClassMeta {
|
|
44
|
-
uniqueKey?: string;
|
|
45
|
-
className?: string;
|
|
46
|
-
classFamily?: string;
|
|
47
|
-
classNameInBrowser?: string;
|
|
48
|
-
target?: Function;
|
|
49
|
-
}
|
|
50
|
-
class ClassConfig {
|
|
51
|
-
browserTransformFn?: (entity: any) => any;
|
|
52
|
-
singleton: Object;
|
|
53
|
-
injections: {
|
|
54
|
-
getter: Function;
|
|
55
|
-
propertyName: string;
|
|
56
|
-
}[];
|
|
57
|
-
calculatedPath: string;
|
|
58
|
-
path: string;
|
|
59
|
-
vChildren?: ClassConfig[];
|
|
60
|
-
vParent?: ClassConfig;
|
|
61
|
-
classReference: Function;
|
|
62
|
-
className?: string;
|
|
63
|
-
uniqueKey?: string;
|
|
64
|
-
classNameInBrowser?: string;
|
|
65
|
-
methods: {
|
|
66
|
-
[methodName: string]: MethodConfig;
|
|
67
|
-
};
|
|
68
|
-
}
|
|
2
|
+
import { ConfigModels } from 'tnp-config/websql';
|
|
3
|
+
export declare namespace Models {
|
|
4
|
+
type CLASSNAMEOptions = {
|
|
5
|
+
uniqueKey?: string;
|
|
6
|
+
/**
|
|
7
|
+
* autoinstance - create instance of singleton automaticly inside decorator
|
|
8
|
+
* first-instance - use first instace of created class as decorator
|
|
9
|
+
*/
|
|
10
|
+
singleton?: 'autoinstance' | 'first-instance' | 'last-instance' | boolean;
|
|
11
|
+
classFamily?: string;
|
|
12
|
+
classNameInBrowser?: string;
|
|
13
|
+
};
|
|
14
|
+
class ParamConfig {
|
|
15
|
+
paramName: string;
|
|
16
|
+
paramType: ConfigModels.ParamType;
|
|
17
|
+
index: number;
|
|
18
|
+
defaultType: any;
|
|
19
|
+
expireInSeconds?: number;
|
|
20
|
+
}
|
|
21
|
+
class MethodConfig {
|
|
22
|
+
methodName: string;
|
|
23
|
+
/**
|
|
24
|
+
* path is global in express app
|
|
25
|
+
*/
|
|
26
|
+
global?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* override default content type
|
|
29
|
+
*/
|
|
30
|
+
contentType?: any;
|
|
31
|
+
/**
|
|
32
|
+
* override default axiso response type
|
|
33
|
+
*/
|
|
34
|
+
responseType?: any;
|
|
35
|
+
path: string;
|
|
36
|
+
descriptor: PropertyDescriptor;
|
|
37
|
+
type: ConfigModels.HttpMethod;
|
|
38
|
+
requestHandler: any;
|
|
39
|
+
parameters: {
|
|
40
|
+
[paramName: string]: ParamConfig;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
interface ClassMeta {
|
|
44
|
+
uniqueKey?: string;
|
|
45
|
+
className?: string;
|
|
46
|
+
classFamily?: string;
|
|
47
|
+
classNameInBrowser?: string;
|
|
48
|
+
target?: Function;
|
|
49
|
+
}
|
|
50
|
+
class ClassConfig {
|
|
51
|
+
browserTransformFn?: (entity: any) => any;
|
|
52
|
+
singleton: Object;
|
|
53
|
+
injections: {
|
|
54
|
+
getter: Function;
|
|
55
|
+
propertyName: string;
|
|
56
|
+
}[];
|
|
57
|
+
calculatedPath: string;
|
|
58
|
+
path: string;
|
|
59
|
+
vChildren?: ClassConfig[];
|
|
60
|
+
vParent?: ClassConfig;
|
|
61
|
+
classReference: Function;
|
|
62
|
+
className?: string;
|
|
63
|
+
uniqueKey?: string;
|
|
64
|
+
classNameInBrowser?: string;
|
|
65
|
+
methods: {
|
|
66
|
+
[methodName: string]: MethodConfig;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
69
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import { Models } from './models';
|
|
3
|
-
export declare const registerd: {
|
|
4
|
-
configs: Models.ClassConfig[];
|
|
5
|
-
classes: Function[];
|
|
2
|
+
import { Models } from './models';
|
|
3
|
+
export declare const registerd: {
|
|
4
|
+
configs: Models.ClassConfig[];
|
|
5
|
+
classes: Function[];
|
|
6
6
|
};
|
package/websql/lib/symbols.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
export declare const SYMBOL: {
|
|
3
|
-
MODELS_MAPPING: symbol;
|
|
4
|
-
DEFAULT_MODEL: symbol;
|
|
5
|
-
STORAGE: string;
|
|
6
|
-
CLASSES: string;
|
|
2
|
+
export declare const SYMBOL: {
|
|
3
|
+
MODELS_MAPPING: symbol;
|
|
4
|
+
DEFAULT_MODEL: symbol;
|
|
5
|
+
STORAGE: string;
|
|
6
|
+
CLASSES: string;
|
|
7
7
|
};
|