Skip to content

fix: correct JSDoc position range to match code validation (1-70)#2183

Open
huizixin wants to merge 1 commit into
trekhleb:masterfrom
huizixin:fix/fibonacci-doc-inconsistency
Open

fix: correct JSDoc position range to match code validation (1-70)#2183
huizixin wants to merge 1 commit into
trekhleb:masterfrom
huizixin:fix/fibonacci-doc-inconsistency

Conversation

@huizixin

Copy link
Copy Markdown

Description

The JSDoc comment for fibonacciClosedForm() states the valid position range is "1 to 75", but the code validates against topMaxValidPosition = 70.

// Current JSDoc (line 7)
@param {number} position - Position number of fibonacci sequence (must be number from 1 to 75).

// Actual validation (line 10)
const topMaxValidPosition = 70;

Changes

  • Updated JSDoc @param description to reflect the actual valid range (1 to 70)

Verification

The error message in the code already correctly uses the topMaxValidPosition variable:

throw new Error(`Can't handle position smaller than 1 or greater than ${topMaxValidPosition}`);

This PR only fixes the documentation to match the implementation.

The JSDoc comment states the valid position range is '1 to 75', but the code validates against topMaxValidPosition = 70.

This PR fixes the documentation to match the implementation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant