Skip to content

Conversation

@Fdawgs
Copy link
Owner

@Fdawgs Fdawgs commented Oct 29, 2025

Internal variable.

Checklist

@Fdawgs Fdawgs requested a review from Copilot October 29, 2025 19:47
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates type definitions to accurately reflect actual usage and removes internal implementation details from public documentation. The changes align type annotations with the codebase's current implementation where all options are boolean-only.

  • Restricted OptionDetails.type from union type 'boolean'|'number'|'string' to just 'boolean' to match actual usage
  • Added @ignore tag to ERROR_MSGS constant and changed its type to Readonly<Record<string, string>> to hide it from public API documentation
  • Updated API.md documentation to reflect the source code changes

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/index.js Narrowed OptionDetails.type to 'boolean' only and marked ERROR_MSGS as internal with readonly type
API.md Removed ERROR_MSGS documentation and updated OptionDetails.type documentation to reflect boolean-only type
Comments suppressed due to low confidence (1)

src/index.js:83

  • This condition check for non-boolean types is now obsolete since OptionDetails.type has been narrowed to only 'boolean'. The logic can be simplified to just if (option) since all options are guaranteed to be boolean type.
				if (acceptedOption.type !== "boolean" || option) {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Fdawgs Fdawgs requested a review from Copilot October 30, 2025 09:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Fdawgs Fdawgs changed the title fix(index): correct OptionDetails.type type refactor(index): simplify boolean check, all options are boolean Oct 30, 2025
@Fdawgs Fdawgs changed the title refactor(index): simplify boolean check, all options are boolean chore(index): hide global from api docs Oct 30, 2025
@Fdawgs Fdawgs merged commit 0fb2d29 into main Oct 30, 2025
14 of 16 checks passed
@Fdawgs Fdawgs deleted the fix/types branch October 30, 2025 09:51
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.

2 participants