-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Category: documentation
Severity: patch
File(s): background.js
Description
readLocationHeader(headers) correctly extracts the HTTP Location response header, but its JSDoc block only contains a prose description. The @param and @returns tags are absent, which prevents IDE tooling from providing type hints and makes the contract less explicit for contributors.
Problematic code example
/**
* Extracts the value of the HTTP `Location` response header from a header array.
* Comparison is case-insensitive to match RFC 7230 requirements.
*/
const readLocationHeader = (headers = []) => { … };Suggested fix
/**
* Extracts the value of the HTTP `Location` response header from a header array.
* Comparison is case-insensitive to match RFC 7230 requirements.
*
* @param {browser.webRequest.HttpHeader[]} [headers=[]] - Array of response headers.
* @returns {string} The Location header value, or `""` if absent or malformed.
*/
const readLocationHeader = (headers = []) => { … };Acceptance criteria
-
@paramtag is present with type and description -
@returnstag is present with type and description - Documentation is consistent with other functions in the file
Reactions are currently unavailable