Skip to content

Commit 374109f

Browse files
committed
fix jsdoc lint warnings
1 parent ccd89b3 commit 374109f

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

src/clients/core/sideconversations.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const {ApiTypes} = require('../../constants');
2323
* @property {Participant} [from] - The participant who sent the message. See Participants
2424
* @property {Participant[]} to - The list of participants the message was sent to. See Participants
2525
* @property {string[]} [attachment_ids] - List of tokens received from uploading files for comment attachments. The files are attached by creating or updating tickets with the tokens. See Attaching files in Tickets
26-
* @property {Object.<string, string>} [external_ids] - A key-value object where all values are strings. Used for message metadata
26+
* @property {{[key: string]: string}} [external_ids] - A key-value object where all values are strings. Used for message metadata
2727
*/
2828

2929
/**
@@ -35,7 +35,7 @@ const {ApiTypes} = require('../../constants');
3535
/**
3636
* @typedef {object} SideConversation
3737
* @property {string} created_at - The time the side conversation was created
38-
* @property {Object.<string, string>} [external_ids] - A key-value store of metadata. All values must be strings
38+
* @property {{[key: string]: string}} [external_ids] - A key-value store of metadata. All values must be strings
3939
* @property {string} id - Automatically assigned when the side conversation is created
4040
* @property {string} message_added_at - The time of the last message on the side conversation
4141
* @property {Participant[]} participants - An array of participants in the side conversation. See Participants
@@ -61,7 +61,7 @@ const {ApiTypes} = require('../../constants');
6161
/**
6262
* @typedef {object} CreateSideConversation
6363
* @property {Message} message - The side conversation object.
64-
* @property {Object.<string, string>} [external_ids] - A key-value object where all values are strings. Used for conversation metadata
64+
* @property {{[key: string]: string}} [external_ids] - A key-value object where all values are strings. Used for conversation metadata
6565
*/
6666

6767
/**
@@ -163,7 +163,7 @@ class SideConversations extends Client {
163163
* Upload a file to be attached to a ticket comment.
164164
* @param {ArrayBuffer} file - The file data.
165165
* @param {object} options - The file options.
166-
* @param options.filename
166+
* @param {string} options.filename - The name of the file.
167167
* @returns {Promise<SideConversationAttachment>} The attachment details.
168168
*/
169169
async attachments(file, {filename}) {

src/clients/core/tickets.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,10 @@ const {Client} = require('../client');
115115
*/
116116

117117
/**
118-
* @typedef {T extends object ? { [K in keyof T]?: RecursivePartial<T[K]> } : T} RecursivePartial
119-
* @template T
118+
* Recursively makes all properties of T optional.
119+
* @typedef {object} RecursivePartial
120+
* @template T - the type being partially applied
121+
* @property {T} [property] - Optionally each property of T.
120122
*/
121123

122124
/**

src/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class ZendeskClient {
128128
}
129129

130130
/**
131-
* @returns {Groups}
131+
* @returns {import('./clients/core/groups.js').Groups} The Group client.
132132
*/
133133
get groups() {
134134
const {Groups} = require('./clients/core/groups');
@@ -223,7 +223,7 @@ class ZendeskClient {
223223
}
224224

225225
/**
226-
* @returns {SideConversations}
226+
* @returns {import('./clients/core/sideconversations.js').SideConversations} The SideConversations client.
227227
*/
228228
get sideconversations() {
229229
const {SideConversations} = require('./clients/core/sideconversations');
@@ -276,15 +276,15 @@ class ZendeskClient {
276276
}
277277

278278
/**
279-
* @returns {TicketMetrics}
279+
* @returns {import('./clients/core/ticketmetrics.js').TicketMetrics} The TicketMetrics client
280280
*/
281281
get ticketmetrics() {
282282
const {TicketMetrics} = require('./clients/core/ticketmetrics');
283283
return this._instantiate(TicketMetrics);
284284
}
285285

286286
/**
287-
* @returns {Tickets}
287+
* @returns {import('./clients/core/tickets.js').Tickets} The Tickets client.
288288
*/
289289
get tickets() {
290290
const {Tickets} = require('./clients/core/tickets');
@@ -307,7 +307,7 @@ class ZendeskClient {
307307
}
308308

309309
/**
310-
* @returns {Users}
310+
* @returns {import('./clients/core/users.js').Users} The Users Instance
311311
*/
312312
get users() {
313313
const {Users} = require('./clients/core/users');

test/setup.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ export const initializeClient = (config) => {
3636

3737
/**
3838
*
39-
* @param {import('../src/clients/client').ClientOptions} config
40-
* @returns {ZendeskClient}
39+
* @param {import('../src/clients/client').ClientOptions} config - The SetupClient config
40+
* @returns {import('../src/clients/client').ZendeskClient} - The Zendesk Client
4141
*/
4242
export const setupClient = (config = {}) =>
4343
createClient({

0 commit comments

Comments
 (0)