Skip to content

Conversation

@PavelSafronov
Copy link
Contributor

@PavelSafronov PavelSafronov commented Jan 15, 2026

Description

Summary of Changes

Use type predicate for isUint8Array so we don't have to cast the value.

What is the motivation for this change?

value is Uint8Array is the preferred result of isUint8Array, it communicates whether the value is Uint8Array or not to the TS type system.

Double check the following

  • Lint is passing (npm run check:lint)
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@PavelSafronov PavelSafronov requested a review from a team as a code owner January 15, 2026 18:47
@PavelSafronov PavelSafronov marked this pull request as draft January 15, 2026 18:47
@baileympearson baileympearson changed the title use type predicate for isUint8Array fix: use type predicate for isUint8Array Jan 15, 2026
@PavelSafronov PavelSafronov changed the title fix: use type predicate for isUint8Array fix(NODE-7397): Use type predicate for isUint8Array Jan 15, 2026
@PavelSafronov PavelSafronov marked this pull request as ready for review January 15, 2026 19:19
PavelSafronov added a commit to PavelSafronov/node-mongodb-native that referenced this pull request Jan 15, 2026
@baileympearson baileympearson merged commit 89b3a2b into main Jan 16, 2026
9 checks passed
@baileympearson baileympearson deleted the value-is-uint8array branch January 16, 2026 17:42
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.

5 participants