(type, chunk)
| 101 | } |
| 102 | |
| 103 | #decodeTypeValue(type, chunk) { |
| 104 | switch (type) { |
| 105 | case RESP_TYPES.NULL: |
| 106 | this.onReply(this.#decodeNull()); |
| 107 | return false; |
| 108 | |
| 109 | case RESP_TYPES.BOOLEAN: |
| 110 | return this.#handleDecodedValue( |
| 111 | this.onReply, |
| 112 | this.#decodeBoolean(chunk) |
| 113 | ); |
| 114 | |
| 115 | case RESP_TYPES.NUMBER: |
| 116 | return this.#handleDecodedValue( |
| 117 | this.onReply, |
| 118 | this.#decodeNumber( |
| 119 | this.getTypeMapping()[RESP_TYPES.NUMBER], |
| 120 | chunk |
| 121 | ) |
| 122 | ); |
| 123 | |
| 124 | case RESP_TYPES.BIG_NUMBER: |
| 125 | return this.#handleDecodedValue( |
| 126 | this.onReply, |
| 127 | this.#decodeBigNumber( |
| 128 | this.getTypeMapping()[RESP_TYPES.BIG_NUMBER], |
| 129 | chunk |
| 130 | ) |
| 131 | ); |
| 132 | |
| 133 | case RESP_TYPES.DOUBLE: |
| 134 | return this.#handleDecodedValue( |
| 135 | this.onReply, |
| 136 | this.#decodeDouble( |
| 137 | this.getTypeMapping()[RESP_TYPES.DOUBLE], |
| 138 | chunk |
| 139 | ) |
| 140 | ); |
| 141 | |
| 142 | case RESP_TYPES.SIMPLE_STRING: |
| 143 | return this.#handleDecodedValue( |
| 144 | this.onReply, |
| 145 | this.#decodeSimpleString( |
| 146 | this.getTypeMapping()[RESP_TYPES.SIMPLE_STRING], |
| 147 | chunk |
| 148 | ) |
| 149 | ); |
| 150 | |
| 151 | case RESP_TYPES.BLOB_STRING: |
| 152 | return this.#handleDecodedValue( |
| 153 | this.onReply, |
| 154 | this.#decodeBlobString( |
| 155 | this.getTypeMapping()[RESP_TYPES.BLOB_STRING], |
| 156 | chunk |
| 157 | ) |
| 158 | ); |
| 159 | |
| 160 | case RESP_TYPES.VERBATIM_STRING: |
no test coverage detected