Skip to content

Duplicate function $findMatchingParent and $getAncestor #5311

@GermanJablo

Description

@GermanJablo

Maybe it's not that important... but it seems that these two functions do exactly the same thing.

The only difference is that getAncestor is a type guard as well.

What should be done? Options

  1. Modify the return type of $findMatchingParent so that it is also a type guard, and make one function call the other, but leave both to avoid a breaking change.
  2. Delete one of the two functions. In case of removing getAncestor make $findMatchingParent a type guard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions