typescript-class-helpers 13.2.3 → 13.2.4

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.
Files changed (81) hide show
  1. package/app.js +3 -3
  2. package/browser/README.md +24 -24
  3. package/browser/esm2020/lib/classname.mjs +150 -150
  4. package/browser/esm2020/lib/describe-class.mjs +65 -65
  5. package/browser/esm2020/lib/errors-messages.mjs +3 -3
  6. package/browser/esm2020/lib/index.mjs +134 -134
  7. package/browser/esm2020/lib/models.mjs +26 -26
  8. package/browser/esm2020/lib/registerd-db.mjs +5 -5
  9. package/browser/esm2020/lib/set-class-name.mjs +89 -89
  10. package/browser/esm2020/lib/storage.mjs +23 -23
  11. package/browser/esm2020/lib/symbols.mjs +7 -7
  12. package/browser/esm2020/public-api.mjs +1 -1
  13. package/browser/esm2020/typescript-class-helpers.mjs +4 -4
  14. package/browser/fesm2015/typescript-class-helpers.mjs +470 -470
  15. package/browser/fesm2020/typescript-class-helpers.mjs +470 -470
  16. package/browser/lib/classname.d.ts +15 -15
  17. package/browser/lib/describe-class.d.ts +5 -5
  18. package/browser/lib/index.d.ts +32 -32
  19. package/browser/lib/models.d.ts +66 -66
  20. package/browser/lib/registerd-db.d.ts +4 -4
  21. package/browser/lib/set-class-name.d.ts +1 -1
  22. package/browser/lib/symbols.d.ts +5 -5
  23. package/browser/typescript-class-helpers.d.ts +4 -4
  24. package/client/README.md +24 -24
  25. package/client/esm2020/lib/classname.mjs +150 -150
  26. package/client/esm2020/lib/describe-class.mjs +65 -65
  27. package/client/esm2020/lib/errors-messages.mjs +3 -3
  28. package/client/esm2020/lib/index.mjs +134 -134
  29. package/client/esm2020/lib/models.mjs +26 -26
  30. package/client/esm2020/lib/registerd-db.mjs +5 -5
  31. package/client/esm2020/lib/set-class-name.mjs +89 -89
  32. package/client/esm2020/lib/storage.mjs +23 -23
  33. package/client/esm2020/lib/symbols.mjs +7 -7
  34. package/client/esm2020/public-api.mjs +1 -1
  35. package/client/esm2020/typescript-class-helpers.mjs +4 -4
  36. package/client/fesm2015/typescript-class-helpers.mjs +470 -470
  37. package/client/fesm2020/typescript-class-helpers.mjs +470 -470
  38. package/client/lib/classname.d.ts +15 -15
  39. package/client/lib/describe-class.d.ts +5 -5
  40. package/client/lib/index.d.ts +32 -32
  41. package/client/lib/models.d.ts +66 -66
  42. package/client/lib/registerd-db.d.ts +4 -4
  43. package/client/lib/set-class-name.d.ts +1 -1
  44. package/client/lib/symbols.d.ts +5 -5
  45. package/client/typescript-class-helpers.d.ts +4 -4
  46. package/index.d.ts +1 -1
  47. package/lib/classname.d.ts +16 -16
  48. package/lib/describe-class.d.ts +6 -6
  49. package/lib/errors-messages.d.ts +1 -1
  50. package/lib/index.d.ts +33 -33
  51. package/lib/models.d.ts +68 -68
  52. package/lib/registerd-db.d.ts +5 -5
  53. package/lib/set-class-name.d.ts +2 -2
  54. package/lib/storage.d.ts +1 -1
  55. package/lib/symbols.d.ts +6 -6
  56. package/package.json +3 -3
  57. package/package.json_devDependencies.json +223 -223
  58. package/package.json_tnp.json5 +48 -48
  59. package/tmp-environment.json +13 -13
  60. package/websql/README.md +24 -24
  61. package/websql/esm2020/lib/classname.mjs +150 -150
  62. package/websql/esm2020/lib/describe-class.mjs +65 -65
  63. package/websql/esm2020/lib/errors-messages.mjs +3 -3
  64. package/websql/esm2020/lib/index.mjs +134 -134
  65. package/websql/esm2020/lib/models.mjs +24 -24
  66. package/websql/esm2020/lib/registerd-db.mjs +5 -5
  67. package/websql/esm2020/lib/set-class-name.mjs +89 -89
  68. package/websql/esm2020/lib/storage.mjs +23 -23
  69. package/websql/esm2020/lib/symbols.mjs +7 -7
  70. package/websql/esm2020/public-api.mjs +1 -1
  71. package/websql/esm2020/typescript-class-helpers.mjs +4 -4
  72. package/websql/fesm2015/typescript-class-helpers.mjs +468 -468
  73. package/websql/fesm2020/typescript-class-helpers.mjs +468 -468
  74. package/websql/lib/classname.d.ts +15 -15
  75. package/websql/lib/describe-class.d.ts +5 -5
  76. package/websql/lib/index.d.ts +32 -32
  77. package/websql/lib/models.d.ts +67 -67
  78. package/websql/lib/registerd-db.d.ts +4 -4
  79. package/websql/lib/set-class-name.d.ts +1 -1
  80. package/websql/lib/symbols.d.ts +5 -5
  81. 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[];
@@ -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';
@@ -1,68 +1,68 @@
1
1
  // @ts-nocheck
2
- import { ConfigModels } from 'tnp-config/browser';
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
- parameters: {
39
- [paramName: string]: ParamConfig;
40
- };
41
- }
42
- interface ClassMeta {
43
- uniqueKey?: string;
44
- className?: string;
45
- classFamily?: string;
46
- classNameInBrowser?: string;
47
- target?: Function;
48
- }
49
- class ClassConfig {
50
- browserTransformFn?: (entity: any) => any;
51
- singleton: Object;
52
- injections: {
53
- getter: Function;
54
- propertyName: string;
55
- }[];
56
- calculatedPath: string;
57
- path: string;
58
- vChildren?: ClassConfig[];
59
- vParent?: ClassConfig;
60
- classReference: Function;
61
- className?: string;
62
- uniqueKey?: string;
63
- classNameInBrowser?: string;
64
- methods: {
65
- [methodName: string]: MethodConfig;
66
- };
67
- }
2
+ import { ConfigModels } from 'tnp-config/browser';
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
+ parameters: {
39
+ [paramName: string]: ParamConfig;
40
+ };
41
+ }
42
+ interface ClassMeta {
43
+ uniqueKey?: string;
44
+ className?: string;
45
+ classFamily?: string;
46
+ classNameInBrowser?: string;
47
+ target?: Function;
48
+ }
49
+ class ClassConfig {
50
+ browserTransformFn?: (entity: any) => any;
51
+ singleton: Object;
52
+ injections: {
53
+ getter: Function;
54
+ propertyName: string;
55
+ }[];
56
+ calculatedPath: string;
57
+ path: string;
58
+ vChildren?: ClassConfig[];
59
+ vParent?: ClassConfig;
60
+ classReference: Function;
61
+ className?: string;
62
+ uniqueKey?: string;
63
+ classNameInBrowser?: string;
64
+ methods: {
65
+ [methodName: string]: MethodConfig;
66
+ };
67
+ }
68
68
  }
@@ -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
  };
@@ -1,3 +1,3 @@
1
1
  // @ts-nocheck
2
- import { Models } from './models';
2
+ import { Models } from './models';
3
3
  export declare function setClassName(target: Function, className: string, options?: Models.CLASSNAMEOptions): (...args: any[]) => any;
@@ -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
  };
@@ -1,6 +1,6 @@
1
1
  // @ts-nocheck
2
- /**
3
- * Generated bundle index. Do not edit.
4
- */
5
- /// <amd-module name="typescript-class-helpers" />
2
+ /**
3
+ * Generated bundle index. Do not edit.
4
+ */
5
+ /// <amd-module name="typescript-class-helpers" />
6
6
  export * from './public-api';
package/client/README.md CHANGED
@@ -1,24 +1,24 @@
1
- # MyLib
2
-
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.0.
4
-
5
- ## Code scaffolding
6
-
7
- Run `ng generate component component-name --project my-lib` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project my-lib`.
8
- > Note: Don't forget to add `--project my-lib` or else it will be added to the default project in your `angular.json` file.
9
-
10
- ## Build
11
-
12
- Run `ng build my-lib` to build the project. The build artifacts will be stored in the `dist/` directory.
13
-
14
- ## Publishing
15
-
16
- After building your library with `ng build my-lib`, go to the dist folder `cd dist/my-lib` and run `npm publish`.
17
-
18
- ## Running unit tests
19
-
20
- Run `ng test my-lib` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
-
22
- ## Further help
23
-
24
- To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
1
+ # MyLib
2
+
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.0.
4
+
5
+ ## Code scaffolding
6
+
7
+ Run `ng generate component component-name --project my-lib` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project my-lib`.
8
+ > Note: Don't forget to add `--project my-lib` or else it will be added to the default project in your `angular.json` file.
9
+
10
+ ## Build
11
+
12
+ Run `ng build my-lib` to build the project. The build artifacts will be stored in the `dist/` directory.
13
+
14
+ ## Publishing
15
+
16
+ After building your library with `ng build my-lib`, go to the dist folder `cd dist/my-lib` and run `npm publish`.
17
+
18
+ ## Running unit tests
19
+
20
+ Run `ng test my-lib` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
+
22
+ ## Further help
23
+
24
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.