utilium 1.7.8 → 1.7.9
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/struct.js +4 -1
- package/package.json +1 -1
- package/src/struct.ts +4 -1
package/dist/struct.js
CHANGED
@@ -91,7 +91,10 @@ export function struct(options = {}) {
|
|
91
91
|
}
|
92
92
|
context.metadata.struct = { options, members, staticSize };
|
93
93
|
context.addInitializer(function () {
|
94
|
-
this
|
94
|
+
Object.defineProperty(this.prototype, Symbol.size, {
|
95
|
+
get: _structSize.bind(this),
|
96
|
+
enumerable: false,
|
97
|
+
});
|
95
98
|
});
|
96
99
|
return target;
|
97
100
|
};
|
package/package.json
CHANGED
package/src/struct.ts
CHANGED
@@ -130,7 +130,10 @@ export function struct(options: Partial<Options> = {}) {
|
|
130
130
|
context.metadata.struct = { options, members, staticSize } satisfies Metadata;
|
131
131
|
|
132
132
|
context.addInitializer(function (this: any) {
|
133
|
-
this
|
133
|
+
Object.defineProperty(this.prototype, Symbol.size, {
|
134
|
+
get: _structSize.bind(this),
|
135
|
+
enumerable: false,
|
136
|
+
});
|
134
137
|
});
|
135
138
|
|
136
139
|
return target;
|