fix: search continuations should return a Search class

Why? To keep things consistent.
This commit is contained in:
LuanRT
2022-06-18 05:16:21 -03:00
parent 1d2c1ed69b
commit 4c7a42d8d4
9 changed files with 244 additions and 220 deletions

View File

@@ -61,7 +61,12 @@ class Parser {
const on_response_received_endpoints = data.onResponseReceivedEndpoints && Parser.parseRR(data.onResponseReceivedEndpoints) || null;
const on_response_received_endpoints_memo = Parser.#memo;
this.#clearMemo();
this.#createMemo();
const on_response_received_commands = data.onResponseReceivedCommands && Parser.parseRR(data.onResponseReceivedCommands) || null;
const on_response_received_commands_memo = Parser.#memo;
this.#clearMemo();
return {
contents,
contents_memo,
@@ -69,7 +74,8 @@ class Parser {
on_response_received_actions_memo,
on_response_received_endpoints,
on_response_received_endpoints_memo,
on_response_received_commands: data.onResponseReceivedCommands && Parser.parseRR(data.onResponseReceivedCommands) || null,
on_response_received_commands,
on_response_received_commands_memo,
/** @type {*} */
continuation_contents: data.continuationContents && Parser.parseLC(data.continuationContents) || null,
metadata: Parser.parse(data.metadata),