From 1b52d417e427ae2805e79bfa02ffbcd7f583b3b4 Mon Sep 17 00:00:00 2001 From: Natalie Rose Date: Wed, 2 Sep 2026 11:45:08 +1000 Subject: [PATCH] Fixes so that the docs can build (but are not 100% correct) --- .jsdoc.json | 2 +- packages/core/src/client.js | 6 +++++- packages/core/src/planets.js | 3 ++- packages/tasks/src/starmap.js | 5 ++++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.jsdoc.json b/.jsdoc.json index 3aa972b..dd4a644 100644 --- a/.jsdoc.json +++ b/.jsdoc.json @@ -1,6 +1,6 @@ { "source": { - "include": ["lib", "README.md"], + "include": ["packages", "README.md"], "includePattern": ".jsx?$", "excludePattern": "(node_modules/|docs)" }, diff --git a/packages/core/src/client.js b/packages/core/src/client.js index a0412a6..b202339 100644 --- a/packages/core/src/client.js +++ b/packages/core/src/client.js @@ -20,7 +20,11 @@ let creds = null /** * Point the client at `server`, remember the credentials, and log in. * - * @param {{ empire: string, password: string, server: string, apiKey?: string }} config + * @param {Object} config + * @param {string} config.empire + * @param {string} config.password + * @param {string} config.server + * @param {?string} config.apiKey * @return {Promise} the session id */ export async function login({ empire, password, server, apiKey }) { diff --git a/packages/core/src/planets.js b/packages/core/src/planets.js index ef256a5..6d140fd 100644 --- a/packages/core/src/planets.js +++ b/packages/core/src/planets.js @@ -103,7 +103,8 @@ export function findPlanet(name) { * * @param {array} planetList - `[{ id, name }]` * @param {function} callback - `(planet, buildings) => thenable` - * @param {{ force?: boolean }} [opts] + * @param {?Object} opts + * @param {?boolean} opts.force - ignore the happiness check */ export async function eachPlanet(planetList, callback, opts) { opts = _.defaults(opts || {}, { force: false }) diff --git a/packages/tasks/src/starmap.js b/packages/tasks/src/starmap.js index bb20736..6d0c0a3 100644 --- a/packages/tasks/src/starmap.js +++ b/packages/tasks/src/starmap.js @@ -43,7 +43,10 @@ function ringCentres(origin, k) { * once `enough(candidateCount)` is truthy or `maxRing` rings have been scanned. * * @param {{x: number, y: number}} origin - * @param {{ collect: function, enough?: function, maxRing?: number }} opts + * @param {Object} opts + * @param {Function} opts.collect + * @param {?Function} opts.enough + * @param {?number} opts.maxRing */ export async function scanOutward(origin, { collect, enough, maxRing = 2 }) { let seen = new Set() -- 2.51.2