Skip to content

feat: add boolean-to-string entrypoint with custom toString method#238

Open
tijnjh wants to merge 1 commit into
mattpocock:mainfrom
tijnjh:main
Open

feat: add boolean-to-string entrypoint with custom toString method#238
tijnjh wants to merge 1 commit into
mattpocock:mainfrom
tijnjh:main

Conversation

@tijnjh

@tijnjh tijnjh commented Jun 19, 2026

Copy link
Copy Markdown

Boolean#toString() returns 'true' | 'false' instead of string

Copilot AI review requested due to automatic review settings June 19, 2026 13:10

Copilot AI left a comment

Copy link
Copy Markdown

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 introduces a new boolean-to-string entrypoint that narrows Boolean#toString() to the literal string output ("true" / "false"), and wires it into the package’s public entrypoints (including recommended) via the export map.

Changes:

  • Add src/entrypoints/boolean-to-string.d.ts to narrow Boolean#toString() to `${boolean}`.
  • Include the new entrypoint in src/entrypoints/recommended.d.ts.
  • Export ./boolean-to-string from package.json so consumers can import it directly.

Reviewed changes

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

File Description
src/entrypoints/recommended.d.ts Includes the new boolean-to-string entrypoint in the recommended bundle.
src/entrypoints/boolean-to-string.d.ts Adds a global Boolean interface augmentation narrowing toString() to `"true"
package.json Adds a new ./boolean-to-string export pointing to the built artifacts in dist/.

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

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