-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docgen: Expand createSelector() pattern matching to recognize getDepe…
…ndants In #40025 we ran into a situation where a `createSelector()` selector is building an opaque value memoized on state values as dependencies. While this is an unexpected use of a selector it's legitimate and required leaving some additional code and an explanatory comment in order to avoid breaking the `docgen` process. In this patch we're adding recognition for that second argument to the `createSelector()` function, the `getDependants()` function, and if that function has more parameters than the `selector` itself we'll cheat and act like its parameters were listed on the selector. This will likely only happen in practice when the selector ignores `state` but it's pluasible someone might go further and use other inputs in the dependency selection but ignore them on the actual state creation.
- Loading branch information
Showing
3 changed files
with
99 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters