Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

  • Create single-byte.d.ts with TypeScript definitions
  • Define types for createSinglebyteDecoder function
  • Define types for createSinglebyteEncoder function
  • Define types for convenience functions (latin1toString, latin1fromString, windows1252toString, windows1252fromString)
  • Update package.json exports to include types for single-byte.js
  • Address code review feedback on documentation
  • Update header comment to match README.md section (main branch)
  • Use method documentation from README.md for all functions
  • Replace "Will throw" with "Throws" for consistency
  • Inline SinglebyteEncoderOptions interface (used only once)
  • Document options.mode property using JSDoc @param notation
  • Change convenience functions to function declarations instead of const
  • Add missing example code block and windows-* encodings note from README
  • Rebased on latest main (fb1a7eb - includes bigint types)
  • Run security checks (no issues found)
  • Final verification complete
Original prompt

This section details on the original issue you should resolve

<issue_title>Types: single-byte.js</issue_title>
<issue_description>Add types for /single-byte.js</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add types for single-byte.js Add TypeScript definitions for single-byte.js Jan 22, 2026
Copilot AI requested a review from ChALkeR January 22, 2026 08:40
Copy link
Collaborator

@ChALkeR ChALkeR left a comment

Choose a reason for hiding this comment

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

@copilot use method docs from README.md

Copy link
Contributor Author

Copilot AI commented Jan 22, 2026

@copilot use method docs from README.md

Updated in 2625a08. All method documentation now matches the README.md exactly, including:

  • Detailed descriptions from README
  • Example code blocks showing equivalents
  • Additional notes (e.g., TextDecoder aliasing differences for latin1toString)

@ChALkeR ChALkeR changed the title Add TypeScript definitions for single-byte.js feat: add TypeScript definitions for single-byte.js Jan 22, 2026
@ChALkeR ChALkeR changed the title feat: add TypeScript definitions for single-byte.js feat: add TypeScript types for single-byte.js Jan 22, 2026
@ChALkeR ChALkeR marked this pull request as ready for review January 22, 2026 09:03
@ChALkeR ChALkeR requested a review from Copilot January 22, 2026 09:03
Copilot AI requested a review from ChALkeR January 22, 2026 09:04
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 adds comprehensive TypeScript type definitions for the single-byte.js module, enabling better type safety and IDE support for users of this encoding library.

Changes:

  • Added complete TypeScript type definitions in single-byte.d.ts with full JSDoc documentation matching the README
  • Updated package.json to include the new type definitions in the exports configuration and files array
  • Made minor documentation improvements in README.md (reordered sections, changed "Will throw" to "Throws" for consistency)

Reviewed changes

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

File Description
single-byte.d.ts New TypeScript type definitions file with complete type declarations for all exported functions and interfaces, including detailed JSDoc documentation
package.json Added single-byte.d.ts to files array and exports configuration to enable TypeScript support
README.md Minor documentation improvements: reordered section content for better flow and standardized error documentation language

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

Copy link
Collaborator

@ChALkeR ChALkeR left a comment

Choose a reason for hiding this comment

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

@copilot rebase on main

Copilot AI and others added 3 commits January 22, 2026 13:45
Co-authored-by: ChALkeR <291301+ChALkeR@users.noreply.github.com>
Co-authored-by: ChALkeR <291301+ChALkeR@users.noreply.github.com>
@ChALkeR ChALkeR force-pushed the copilot/add-types-for-single-byte-js branch from 6f12fa1 to 4424599 Compare January 22, 2026 09:46
Co-authored-by: ChALkeR <291301+ChALkeR@users.noreply.github.com>
Copilot AI requested a review from ChALkeR January 22, 2026 09:51
Co-authored-by: ChALkeR <291301+ChALkeR@users.noreply.github.com>
Copilot AI requested a review from ChALkeR January 22, 2026 09:59
Co-authored-by: ChALkeR <291301+ChALkeR@users.noreply.github.com>
Copilot AI requested a review from ChALkeR January 22, 2026 10:13
Co-authored-by: ChALkeR <291301+ChALkeR@users.noreply.github.com>
Copilot AI requested a review from ChALkeR January 22, 2026 10:18
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 3 changed files in this pull request and generated no new comments.


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

@ChALkeR ChALkeR merged commit c84c526 into main Jan 22, 2026
36 checks passed
@ChALkeR ChALkeR deleted the copilot/add-types-for-single-byte-js branch January 22, 2026 20:32
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.

Types: single-byte.js

2 participants