Skip to content

Conversation

mediremi
Copy link
Member

@mediremi mediremi commented Apr 13, 2025

While the type RegExp.Result.t (array<option<string>>) is correct, matches was typed as array<string> even though it can contain undefined.

I've also used this PR to make RegExp.fromString more ergonomic by adding an optional flags argument and deprecating RegExp.fromStringWithFlags.

@mediremi mediremi force-pushed the regexp-result-matches-type branch from d39996e to 10d9d1f Compare April 13, 2025 17:10
@mediremi mediremi force-pushed the regexp-result-matches-type branch from 10d9d1f to aae95ea Compare April 13, 2025 17:21
@mediremi mediremi marked this pull request as ready for review April 13, 2025 17:25
@mediremi mediremi force-pushed the regexp-result-matches-type branch from dec17a4 to 0025d93 Compare April 13, 2025 17:46
Copy link
Member

@cknitt cknitt left a comment

Choose a reason for hiding this comment

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

Nice! Thanks a lot!

@cknitt cknitt merged commit 1f0d70d into rescript-lang:master Apr 15, 2025
20 checks passed
@mediremi mediremi deleted the regexp-result-matches-type branch May 24, 2025 16:01
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