Skip to content

Commit

Permalink
fix: jsdoc errors
Browse files Browse the repository at this point in the history
Signed-off-by: Jeffrey Tang <[email protected]>
  • Loading branch information
JeffreyDallas committed Sep 10, 2024
1 parent 12142c2 commit d72ab4c
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/commands/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import * as flags from './flags.mjs'
/**
* Return a list of Yargs command builder to be exposed through CLI
* @param {Object} opts it is an Options object containing logger
* @returns {Array<{command: string, desc: string, builder: Function, handler?: Function}[]>}
* @returns {Array} an array of Yargs command builder
*/
function Initialize (opts) {
const initCmd = new InitCommand(opts)
Expand Down
2 changes: 1 addition & 1 deletion src/commands/init.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export class InitCommand extends BaseCommand {
/**
* Return Yargs command definition for 'init' command
* @param {InitCommand} initCmd - an instance of InitCommand
* @returns {{command: string, desc: string, builder: Function, handler: (argv: Object) => void}}
* @returns A object representing the Yargs command definition
*/
static getCommandDefinition (initCmd) {
if (!initCmd || !(initCmd instanceof InitCommand)) {
Expand Down
14 changes: 7 additions & 7 deletions src/commands/node.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ export class NodeCommand extends BaseCommand {
/**
* Return task for checking for all network node pods
* @param {any} ctx
* @param {typeof import('listr2').TaskWrapper} task
* @param {TaskWrapper} task
* @param {string[]} nodeIds
* @returns {*}
*/
Expand Down Expand Up @@ -439,7 +439,7 @@ export class NodeCommand extends BaseCommand {
/**
* @param {string[]} nodeIds
* @param {Object} podNames
* @param {typeof import('listr2').TaskWrapper} task
* @param {TaskWrapper} task
* @param {string} localBuildPath
* @returns {Listr<*, *, *>}
*/
Expand Down Expand Up @@ -499,7 +499,7 @@ export class NodeCommand extends BaseCommand {
* @param {string[]} nodeIds
* @param {Object} podNames
* @param {string} releaseTag
* @param {typeof import('listr2').TaskWrapper} task
* @param {TaskWrapper} task
* @param {string} localBuildPath
* @returns {Listr<*, *, *>}
*/
Expand All @@ -516,7 +516,7 @@ export class NodeCommand extends BaseCommand {
* @param {string[]} nodeIds
* @param {Object} podNames
* @param {string} releaseTag
* @param {typeof import('listr2').TaskWrapper} task
* @param {TaskWrapper} task
* @param {PlatformInstaller} platformInstaller
* @returns {Listr<any, any, any>}
*/
Expand Down Expand Up @@ -1981,7 +1981,7 @@ export class NodeCommand extends BaseCommand {
/**
* @param {PrivateKey|string} freezeAdminPrivateKey
* @param {Uint8Array|string} upgradeZipHash
* @param {Client<import('../channel/Channel.js').default,import('../channel/MirrorChannel.js').default>} client
* @param {NodeClient} client
* @returns {Promise<void>}
*/
async prepareUpgradeNetworkNodes (freezeAdminPrivateKey, upgradeZipHash, client) {
Expand Down Expand Up @@ -2020,7 +2020,7 @@ export class NodeCommand extends BaseCommand {
/**
* @param {PrivateKey|string} freezeAdminPrivateKey
* @param {Uint8Array|string} upgradeZipHash
* @param {Client<import('../channel/Channel.js').default,import('../channel/MirrorChannel.js').default>} client
* @param {NodeClient} client
* @returns {Promise<void>}
*/
async freezeUpgradeNetworkNodes (freezeAdminPrivateKey, upgradeZipHash, client) {
Expand Down Expand Up @@ -2052,7 +2052,7 @@ export class NodeCommand extends BaseCommand {
/**
* @param {Object} podNames
* @param {string} nodeIds
* @param {{title: string, task: () => Promise<void>}[]} subTasks
* @param {Object[]} subTasks
*/
startNodes (podNames, nodeIds, subTasks) {
for (const nodeId of nodeIds) {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/relay.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { getNodeAccountMap } from '../core/helpers.mjs'

export class RelayCommand extends BaseCommand {
/**
* @param {{profileManager: ProfileManager, accountManager?: AccountManager, logger: Logger, helm: Helm, k8: K8,
* @param {{profileManager: ProfileManager, accountManager: AccountManager, logger: Logger, helm: Helm, k8: K8,
* chartManager: ChartManager, configManager: ConfigManager, depManager: DependencyManager,
* downloader: PackageDownloader}} opts
*/
Expand Down
2 changes: 1 addition & 1 deletion src/core/constants.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const POD_CONDITION_STATUS_TRUE = 'True'

/**
* Listr related
* @type {LoggerFieldFn<[number]> & {condition: (duration: number) => boolean, format: (duration: number) => Color}}
* @return a object that defines the default color options
*/
export const LISTR_DEFAULT_RENDERER_TIMER_OPTION = {
...PRESET_TIMER,
Expand Down
6 changes: 3 additions & 3 deletions src/core/dependency_managers/dependency_manager.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ export class DependencyManager extends ShellRunner {
}

/**
* @param {*[]} [deps]
* @returns {{title: string, task: () => Promise<void>}[]}
* @param {String[]} deps
* @param {Object[]} subTasks
*/
taskCheckDependencies (deps = []) {
taskCheckDependencies (deps) {
const subTasks = []
deps.forEach(dep => {
subTasks.push({
Expand Down
4 changes: 2 additions & 2 deletions src/core/k8.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export class K8 {
/**
* Get pods by labels
* @param {string[]} labels - list of labels
* @returns {Promise<Array<import('@kubernetes/client-node').V1Pod>>}
* @returns {Promise<Array<V1Pod>>}
*/
async getPodsByLabel (labels = []) {
const ns = this._getNamespace()
Expand Down Expand Up @@ -342,7 +342,7 @@ export class K8 {
* @param {string} containerName
* @param {string} destPath - path inside the container
* @param {number} [timeout] - timeout in ms
* @returns {Promise<{owner: string, size: number, modifiedAt: string, name: string, directory: boolean, group: string}[]>}
* @returns {Promise<{owner: string, size: number, modifiedAt: string, name: string, directory: boolean, group: string}>}
* array of directory entries, custom object
*/
async listDir (podName, containerName, destPath, timeout = 5000) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/platform_installer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ export class PlatformInstaller {
*
* @param stagingDir staging directory path
* @param nodeIds list of node ids
* @returns {Listr<ListrContext, ListrPrimaryRendererValue, ListrSecondaryRendererValue>[]}
* @returns {Listr<ListrContext, ListrPrimaryRendererValue, ListrSecondaryRendererValue>}
*/
copyNodeKeys (stagingDir, nodeIds) {
const self = this
Expand Down

0 comments on commit d72ab4c

Please sign in to comment.