constructor(root, xref, type) {
    if (
      (typeof PDFJSDev === "undefined" || PDFJSDev.test("TESTING")) &&
      this.constructor === NameOrNumberTree
    ) {
      unreachable("Cannot initialize NameOrNumberTree.");
    }
    this.root = root;
    this.xref = xref;
    this._type = type;
  }
A NameTree/NumberTree is like a Dict but has some advantageous properties,
see the specification (7.9.6 and 7.9.7) for additional details.
TODO: implement all the Dict functions and make this more efficient.