framework-do-dede 3.0.18 → 3.0.19

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.
@@ -96,12 +96,23 @@ export class Entity {
96
96
  this[`get${property[0].toUpperCase()}${property.slice(1)}`] = () => this[property];
97
97
  continue;
98
98
  }
99
+ let prefixName = null;
99
100
  // @ts-ignore
100
- const prefixName = this.constructor?.propertiesConfigs[property]?.prefix || (typeof this[property] === 'boolean' ? 'is' : 'get');
101
- const getterName = `${prefixName}${property[0].toUpperCase()}${property.slice(1)}`;
102
- if (this[getterName])
103
- continue;
104
- this[getterName] = () => this[property];
101
+ if (this.constructor.propertiesConfigs && this.constructor.propertiesConfigs[property] && this.constructor.propertiesConfigs[property].prefix) {
102
+ // @ts-ignore
103
+ prefixName = this.constructor.propertiesConfigs[property].prefix;
104
+ }
105
+ else {
106
+ const isBoolean = this[property] ? typeof this[property] === 'boolean' : false;
107
+ prefixName = isBoolean ? 'is' : 'get';
108
+ }
109
+ let getterName = null;
110
+ if (property[0]) {
111
+ getterName = `${prefixName}${property[0].toUpperCase()}${property.slice(1)}`;
112
+ if (this[getterName])
113
+ continue;
114
+ this[getterName] = () => this[property];
115
+ }
105
116
  }
106
117
  }
107
118
  constructor() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framework-do-dede",
3
- "version": "3.0.18",
3
+ "version": "3.0.19",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",