-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
When I try parse YANG model in browser, it throws error as below:
ERROR TypeError: Cannot assign to read only property 'module' of function 'function evaluate() {
var _self;
return (_self = self).eval.apply(_self, arguments);
}'
here is the YANG model which I was parsed
const schema = `
module foo {
include foo-sub;
container foo {
leaf a { type string; }
leaf b { type uint8; }
list bar {
key "b1";
leaf b1 { type uint16; }
container blob;
}
uses fs;
}
}`;
const subSchema = `
submodule foo-sub {
yang-version 1.1;
belongs-to foo {
prefix "foo";
}
grouping fs {
container fs {
leaf c {
mandatory true;
type string {
length "1..max";
}
description
"The alias of effective master key.";
}
}
}
}`;
let instance2 = (window as any).Yang.use(
(window as any).Yang.parse(subSchema, { compile: false })
);
instance2 = (window as any).Yang.use(
(window as any).Yang.parse(schema, { compile: false })
);
const compileResult = instance2.compile();and error throw with this line

could anyone help with this? or give some hints? thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels