Skip to content

Make ArrayValue type distributive#1737

Merged
axelboc merged 1 commit intomainfrom
distributive
Jan 23, 2025
Merged

Make ArrayValue type distributive#1737
axelboc merged 1 commit intomainfrom
distributive

Conversation

@axelboc
Copy link
Contributor

@axelboc axelboc commented Jan 21, 2025

As a reminder, providers are allowed to return boolean datasets as boolean[] (HSDS only) or as number[] (h5wasm #1692 and h5grove #1709).

The goal here is for ArrayValue<BooleanType> to evaluate to number[] | boolean[] instead of (number | boolean)[] (which was quite wrong). This doesn't change much but it will matter more when introducing bigint...

While I'm at it, I give the Primitive and ArrayValue generics default values, and I use ArrayValue in a bunch of places to replace unknown[] | TypedArray. This will save me later from adding BigInt64Array and BigUint64Array to that type everywhere...

@axelboc axelboc requested a review from loichuder January 21, 2025 14:21
Base automatically changed from merge-int-types to main January 21, 2025 15:56
Copy link
Member

@loichuder loichuder left a comment

Choose a reason for hiding this comment

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

Looks good!

@axelboc axelboc merged commit fde64c3 into main Jan 23, 2025
8 checks passed
@axelboc axelboc deleted the distributive branch January 23, 2025 14:30
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