docs: add operator flag to operator functions #6563
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This PR adds a label to all functions that are considered as operator functions. That is, any function that is exported from
src/internal/operators
will have this label.The processor that was created to determine if a document
isOperator
determines this by checking if a document hasoriginalModule
and iforiginalModule
starts with'internal/operators'
. This means that any exported function that is not operator that may in future come from'internal/operators'
will be marked as an operator - for now, there are no such functions. But if some util (non-operator) function gets exported in future from'internal/operators'
, it should be moved to another place so that it doesn't get marked as operator.This is a handy addition, especially after RxJS v7.2.0 since operators are exported from
'rxjs'
and many operators are now displayed on two pages (for example: http://rxjs.dev/api/operators/map and http://rxjs.dev/api/index/function/map).Some examples how this looks like (please notice URL):
zip
creation function, exported from'rxjs'
:Deprecated
zip
operator, exported from'rxjs/operators'
:Note: almost all (if not all) processors come with a
.spec.js
file. I didn't add one with this PR as so many tests actually fail when tests are run. For this reason, I don't think those tests are really essential. If they ever become essential, I will write some.Related issue (if exists):
Somewhat #6544.