Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
decodeArrayOrElement(typeDictionary, field, thisAny, stream);
break;
case FieldCategory.enumeration:
case FieldCategory.basic:
decodeArrayOrElement(typeDictionary, field, thisAny, stream, field.schema.decode);
break;
default:
/* istanbul ignore next*/
throw new Error("Invalid category " + field.category + " " + FieldCategory[field.category]);
}
}
}
class DynamicExtensionObject extends ExtensionObject {
public static schema: StructuredTypeSchema = ExtensionObject.schema;
public static possibleFields: string[] = [];
private readonly _typeDictionary: TypeDictionary;
private __schema?: StructuredTypeSchema;
constructor(options: any, schema: StructuredTypeSchema, typeDictionary: TypeDictionary) {
assert(schema, "expecting a schema here ");
assert(typeDictionary, "expecting a typeDic");
super(options);
options = options || {};
this.__schema = schema;
this._typeDictionary = typeDictionary;
check_options_correctness_against_schema(this, this.schema, options);