ddd-node 24.1.0 → 24.1.1
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { EnumClass, EnumValue } from "../core";
|
|
2
|
-
export declare const Enum: (value
|
|
2
|
+
export declare const Enum: (value?: EnumValue) => <T extends EnumClass<import("../core").EnumBase, any[]>>(target: T, key: string) => void;
|
package/dist/decorators/enum.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.Enum = void 0;
|
|
|
4
4
|
const model_1 = require("../model");
|
|
5
5
|
const Enum = (value) => {
|
|
6
6
|
return (target, key) => {
|
|
7
|
-
(0, model_1.Static)(() => new target(value))(target, key);
|
|
7
|
+
(0, model_1.Static)(() => new target(value ?? key))(target, key);
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
10
|
exports.Enum = Enum;
|
package/dist/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"ddd-node","version":"24.1.
|
|
1
|
+
{"name":"ddd-node","version":"24.1.1","description":"Domain Driven Design base for NodeJs","type":"commonjs","main":"index.js","types":"index.d.ts","files":["dist"],"repository":{"type":"git","url":"https://github.com/nqd881/ddd-node"},"keywords":["ddd","ddd-node","ddd-base","ddd-ts","ddd-js"],"author":"Quoc Dai","license":"ISC","devDependencies":{"@types/chai":"^4.3.16","@types/lodash":"^4.14.200","@types/mocha":"^10.0.6","@types/uuid":"^9.0.6","chai":"^5.1.1","chai-deep-match":"^1.2.1","ddd-node":"file:dist","mocha":"^10.4.0","ts-node":"^10.9.1","tsconfig-paths":"^4.2.0","typescript":"^5.2.2"},"dependencies":{"lodash":"^4.17.21","reflect-metadata":"^0.1.13","tsc-alias":"^1.8.8","type-fest":"^4.20.1","uuid":"^9.0.1"}}
|