Skip to content

Commit

Permalink
add jsdoc for Response class
Browse files Browse the repository at this point in the history
  • Loading branch information
rockwellll committed Jan 11, 2025
1 parent fa948c5 commit 289ad1e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 8 additions & 0 deletions src/api/response.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/**
* Response class
* @class
* @classdesc Represents a response from the API
* @property {Boolean} succeeded
* @property {Object} data
*/

class Response {
#success

Expand Down
4 changes: 0 additions & 4 deletions src/hellotext.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ class Hellotext {
* @returns {Promise<Response>}
*/
static async track(action, params = {}) {
if (this.#query.inPreviewMode) {
return Promise.resolve().then(() => new Response(true, { received: true }))
}

if (this.notInitialized) {
throw new NotInitializedError()
}
Expand Down

0 comments on commit 289ad1e

Please sign in to comment.