From 289ad1e30b5e9b6e0be1fbbd58e6604e9a991230 Mon Sep 17 00:00:00 2001 From: rockwellll Date: Sat, 11 Jan 2025 19:29:40 +0300 Subject: [PATCH] add jsdoc for Response class --- src/api/response.js | 8 ++++++++ src/hellotext.js | 4 ---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/api/response.js b/src/api/response.js index ccdf11c..7a17982 100644 --- a/src/api/response.js +++ b/src/api/response.js @@ -1,3 +1,11 @@ +/** + * Response class + * @class + * @classdesc Represents a response from the API + * @property {Boolean} succeeded + * @property {Object} data + */ + class Response { #success diff --git a/src/hellotext.js b/src/hellotext.js index 11d06df..96b3d11 100644 --- a/src/hellotext.js +++ b/src/hellotext.js @@ -37,10 +37,6 @@ class Hellotext { * @returns {Promise} */ static async track(action, params = {}) { - if (this.#query.inPreviewMode) { - return Promise.resolve().then(() => new Response(true, { received: true })) - } - if (this.notInitialized) { throw new NotInitializedError() }