-
Notifications
You must be signed in to change notification settings - Fork 3k
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
concat documentation not showing up on rxjs.dev #7009
Comments
Oh, I really hope that our quick response wasn't too late 😄 I wonder how this works in every other override we have? 🤔 E.g. share() operator also has two overloads: Can you please write here the output of your Thanks a lot for the report and thorough explanation of the issue. |
Found two other operators with this problem. This is the list so far: I suspect the issue might have something to do with spread parameters.
|
Hmm, I wanted to try it myself before writing anything. I was afraid of the TS wanting to have overload implementation in the last overload declaration, which is the case here. The same happens with Also, I'm not against having this issue temporarily fixed, but I'm afraid that this fix won't work due to TS errors. Is there a way to open an issue on dgeni-packages, link this issue there and tag me so I can follow up? Thanks a lot for bringing this up to our attention. |
The fix is now deployed to the rxjs.dev app. Thanks for reporting. |
Describe the bug
Some awesome documentation exists in the file
src/internal/observable/concat.ts
as JSDoc.However, it's not present on rxjs.dev.
What it currently looks like:
Expected behavior
I expect the documentation to show up on rxjs.dev.
It would look like this:
Reproduction code
Reproduction URL
https://rxjs.dev/api/index/function/concat
Version
7.5.5
Environment
No response
Additional context
I have narrowed the problem down to the TypeScript package in dgeni-packages.
It produces wrong information about the function overloads. I should probably open an issue there, but I want to know what you think about this first. Maybe I'm totally off. Also, I think you'll be quicker to respond and might be interested in the temporary fix I have.
How to test this.
I wrote this function to debug this issue:
It can be defined and called in
docs_app/tools/transforms/angular-api-package/processors/filterContainedDocs.js
. Here is where and how I call it:The key information it logs is the
docType
of the docs array elements. Context:filterContainedDocs
filters away certain docTypes; One being'function-overload'
Current output of my function:
Notice the third element with id
index/concat(...args: any[])
. It got a docType of'function-overload'
(clearly wrong. It's not an overload) resulting in it being filtered away.Quickfix
I'm still not exactly sure why this happens. I do know one fast way to fix it though: change the order of the overloads.
src/internal/observable/concat.ts
contains two overloads at the beginning of the file. If we move them to the bottom of the file we now get another output from my function -Quickfix output of my function:
It's now correct! (this produces the beautiful docs in the screenshot from "Expected behavior" )
I would be more than happy to submit a PR with this fix. I think a few other operators has this problem. I could run through them all to make sure the ordering allows for expected docs.
The text was updated successfully, but these errors were encountered: