Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(distinctUntilChanged): fix docs rendering #6756

Merged

Conversation

jakovljevic-mladen
Copy link
Member

@jakovljevic-mladen jakovljevic-mladen commented Jan 12, 2022

Description:
Please check the related issue for more info. This is how the page looks like with this fix (sorry for the large image):

image

One note: I'm not an expert, but it looks like that having multiple JSDocs comments on the same function overload (for two or more overloads) don't really work with the docs rendering scripts. Maybe there is an option to turn it on, but for now, all documentation should be contained in one JSDocs comment (/** here */) instead of having it in multiple comments (for example, one for each overload).

Related issue (if exists):
Closes #6660

Comment on lines -136 to -139
export function distinctUntilChanged<T, K>(
comparator: (previous: K, current: K) => boolean,
keySelector: (value: T) => K
): MonoTypeOperatorFunction<T>;
Copy link
Member Author

Choose a reason for hiding this comment

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

Moved to top.

Comment on lines -94 to -99
* 1. It will always emit the first value from the source.
* 2. The `keySelector` will be run against all values, including the first value.
* 3. For all values after the first, the selected key will be compared against the key selected from
* the previously emitted value using the `comparator`.
* 4. If the keys are determined to be unequal by this check, the value (not the key), is emitted
* and the selected key from that value is saved for future comparisons against other keys.
Copy link
Member Author

Choose a reason for hiding this comment

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

Moved here.

@benlesh benlesh added 7.x Issues and PRs for version 6.x 8.x Issues and PRs for version 8.x labels Apr 19, 2022
@benlesh benlesh merged commit 2374968 into ReactiveX:master Apr 19, 2022
@jakovljevic-mladen jakovljevic-mladen deleted the fix_distinctUntilChanged_docs branch April 19, 2022 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7.x Issues and PRs for version 6.x 8.x Issues and PRs for version 8.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"distinctUntilChanged", "retry" and "timeoutWith" docs are not rendered properly
2 participants