Skip to content

fix: narrow minOf/maxOf return type - #22

Merged
delacry merged 1 commit into
noctud:0.1.xfrom
nikophil:narrow-minof-maxof-return-type
Jul 25, 2026
Merged

fix: narrow minOf/maxOf return type#22
delacry merged 1 commit into
noctud:0.1.xfrom
nikophil:narrow-minof-maxof-return-type

Conversation

@nikophil

Copy link
Copy Markdown
Contributor

No description provided.

@codecov

codecov Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@nikophil

Copy link
Copy Markdown
Contributor Author

sorry for the spam 😅

those were all the incoherences spotted while working on #19, this is the last PR of this batch ;)

@delacry

delacry commented Jul 25, 2026

Copy link
Copy Markdown
Member

Thanks!

@delacry
delacry merged commit 7434618 into noctud:0.1.x Jul 25, 2026
6 checks passed
delacry added a commit that referenced this pull request Jul 25, 2026
Update the API reference for narrowing that landed in #15, #17, #18,
#19, #21 and #22: flatten(), filterNotNull(),
Map::filterValuesNotNull(), countWhere(), Collection::sum() and
Map::toArray().

Compact types are inlined in the signature (countWhere(): int<0, max>);
conditional ones are described in prose instead, matching how sum() and
intersect() are already documented.

Also fix the flatten() assertion in TransformTypeTest, which still
expected Collection<mixed> and has failed on 0.1.x since #21.
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