Skip to content

Conversation

DanielRosenwasser
Copy link
Member

Addresses the mistake I found at #50713 (comment) just after merging #50713.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Sep 16, 2022
@@ -45,6 +53,9 @@ tests/cases/compiler/regexpExecAndMatchTypeUsages.ts(14,5): error TS2412: Type '
}
else {
execResult = matchResult
~~~~~~~~~~
!!! error TS2375: Type 'RegExpMatchArray' is not assignable to type 'RegExpExecArray' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
Copy link
Member Author

Choose a reason for hiding this comment

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

This sure is a weird error message since undefined doesn't show up at all in the source type. I would guess that this is a bug in exactOptionalPropertyTypes.

@DanielRosenwasser DanielRosenwasser merged commit 0df46e8 into main Sep 16, 2022
@DanielRosenwasser DanielRosenwasser deleted the fixRegexpTest branch September 16, 2022 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants