Something went wrong. Try again.
forked from sarma.tngl.sh/Testing-phase-vidhi
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536import {Number as NumberT} from './Number.js';
export function resolveLength(length, stream, parent) { let res; if (typeof length === 'number') { res = length;
} else if (typeof length === 'function') { res = length.call(parent, parent);
} else if (parent && (typeof length === 'string')) { res = parent[length];
} else if (stream && length instanceof NumberT) { res = length.decode(stream); }
if (isNaN(res)) { throw new Error('Not a fixed size'); }
return res;};
export class PropertyDescriptor { constructor(opts = {}) { this.enumerable = true; this.configurable = true;
for (let key in opts) { const val = opts[key]; this[key] = val; } }}