Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

fix node.trigger return type to handle undefined values#2192

Merged
BPScott merged 2 commits intomainfrom
fix_trigger
Feb 28, 2022
Merged

fix node.trigger return type to handle undefined values#2192
BPScott merged 2 commits intomainfrom
fix_trigger

Conversation

@m4thieulavoie
Copy link
Contributor

Description

Fixes (issue #)

After the changes made lately to the typings of .trigger, a Function | undefined would not be resolved. This PR adds support for that to properly resolve it. Hacking that in the typings of react-testing in web's node_modules made yarn type-check pass properly.

Note that I could've removed the NonNullable<> syntax, but I figured we still want to exclude null. Happy to change if it makes more sense though

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)
  • Minor: New feature (non-breaking change which adds functionality)
  • Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have added a changelog entry, prefixed by the type of change noted above (Documentation fix and Test update does not need a changelog as we do not publish new version)

@m4thieulavoie m4thieulavoie self-assigned this Feb 28, 2022
@m4thieulavoie m4thieulavoie requested a review from a team as a code owner February 28, 2022 13:51
Copy link
Member

@BPScott BPScott left a comment

Choose a reason for hiding this comment

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

Thanks for testing this! Code looks great.

One note inline to add the PR number to the changelog entry

Co-authored-by: Ben Scott <227292+BPScott@users.noreply.github.com>
@BPScott BPScott changed the title fix node.tigger to accept undefined values fix node.trigger return type to handle undefined values Feb 28, 2022
@BPScott BPScott merged commit 5d168a3 into main Feb 28, 2022
@BPScott BPScott deleted the fix_trigger branch February 28, 2022 16:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants