MCPcopy Create free account
hub / github.com/angular/dev-infra / constructor

Method constructor

github-actions/browserstack/set-browserstack-env.js:1020–1043  ·  view source on GitHub ↗

* @param {string} key * @param {any} value * @param {number} index

(key, value, index)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

__publicFieldFunction · 0.70

Tested by

no test coverage detected