utilium 1.7.14 → 1.7.15

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 CHANGED
@@ -97,7 +97,7 @@ export function struct(options = {}) {
97
97
  decl,
98
98
  });
99
99
  const memberSize = typeof length == 'string' ? 0 : sizeof(type) * (length || 1);
100
- isDynamic ||= typeof length == 'string';
100
+ isDynamic ||= isStatic(type) ? type[Symbol.metadata].struct.isDynamic : typeof length == 'string';
101
101
  staticSize = options.isUnion ? Math.max(staticSize, memberSize) : staticSize + memberSize;
102
102
  staticSize = align(staticSize, options.align || 1);
103
103
  _debugLog('define', target.name + '.' + name);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "utilium",
3
- "version": "1.7.14",
3
+ "version": "1.7.15",
4
4
  "description": "Typescript utilities",
5
5
  "funding": {
6
6
  "type": "individual",
package/src/struct.ts CHANGED
@@ -150,7 +150,7 @@ export function struct(options: Partial<Options> = {}) {
150
150
  });
151
151
 
152
152
  const memberSize = typeof length == 'string' ? 0 : sizeof(type) * (length || 1);
153
- isDynamic ||= typeof length == 'string';
153
+ isDynamic ||= isStatic(type) ? type[Symbol.metadata].struct.isDynamic : typeof length == 'string';
154
154
  staticSize = options.isUnion ? Math.max(staticSize, memberSize) : staticSize + memberSize;
155
155
  staticSize = align(staticSize, options.align || 1);
156
156