From dfcbc5b0090bce0df4f28ff8381409f9ca834972 Mon Sep 17 00:00:00 2001 From: Will Eastcott Date: Sat, 30 May 2026 15:27:17 +0100 Subject: [PATCH] docs: replace opaque any/* types with real types in public API reference Two public, reference-visible members documented their JSDoc types as the opaque `*`/`any`, which renders as a meaningless `any` in the generated TypeDoc API reference: - `RenderTarget.getColorBuffer(index)` - `index` is an array index, typed `{*}` -> `{number}`. - `InputConsumer.update()` - the base method discards the frame and returns nothing, so the bogus `@returns {any}` is dropped (per the engine convention of omitting `@returns` when nothing is returned); the `InputController` subclass override already documents its `{Pose}` return. Both compile cleanly (build:types/test:types); the generated declarations now read `getColorBuffer(index: number): Texture` and `InputConsumer.update(...): void` / `InputController.update(...): Pose`. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/extras/input/input.js | 1 - src/platform/graphics/render-target.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/extras/input/input.js b/src/extras/input/input.js index d6083aad042..46bf888d392 100644 --- a/src/extras/input/input.js +++ b/src/extras/input/input.js @@ -216,7 +216,6 @@ class InputConsumer { /** * @param {InputFrame} frame - The input frame. * @param {number} dt - The delta time. - * @returns {any} - The controller pose. */ update(frame, dt) { // discard frame by default diff --git a/src/platform/graphics/render-target.js b/src/platform/graphics/render-target.js index 7b193ba3137..37a905c9368 100644 --- a/src/platform/graphics/render-target.js +++ b/src/platform/graphics/render-target.js @@ -514,7 +514,7 @@ class RenderTarget { /** * Accessor for multiple render target color buffers. * - * @param {*} index - Index of the color buffer to get. + * @param {number} index - Index of the color buffer to get. * @returns {Texture} - Color buffer at the specified index. */ getColorBuffer(index) {