* @param {string} key * @param {any} value * @param {number} index
(key, value, index)
| 1018 | * @param {number} index |
| 1019 | */ |
| 1020 | constructor(key, value, index) { |
| 1021 | /** @type {any} */ |
| 1022 | __publicField(this, "value", null); |
| 1023 | /** @type {null | TstNode} */ |
| 1024 | __publicField(this, "left", null); |
| 1025 | /** @type {null | TstNode} */ |
| 1026 | __publicField(this, "middle", null); |
| 1027 | /** @type {null | TstNode} */ |
| 1028 | __publicField(this, "right", null); |
| 1029 | /** @type {number} */ |
| 1030 | __publicField(this, "code"); |
| 1031 | if (index === void 0 || index >= key.length) { |
| 1032 | throw new TypeError("Unreachable"); |
| 1033 | } |
| 1034 | const code = this.code = key.charCodeAt(index); |
| 1035 | if (code > 127) { |
| 1036 | throw new TypeError("key must be ascii string"); |
| 1037 | } |
| 1038 | if (key.length !== ++index) { |
| 1039 | this.middle = new _TstNode(key, value, index); |
| 1040 | } else { |
| 1041 | this.value = value; |
| 1042 | } |
| 1043 | } |
| 1044 | /** |
| 1045 | * @param {string} key |
| 1046 | * @param {any} value |
nothing calls this directly
no test coverage detected