docs: include additional interfaces to docs#6391
Conversation
| export function throttle<T>( | ||
| durationSelector: (value: T) => ObservableInput<any>, | ||
| { leading, trailing }: ThrottleConfig = defaultThrottleConfig | ||
| config: ThrottleConfig = defaultThrottleConfig |
There was a problem hiding this comment.
This change is added just because we could have a better documentation. Instead of this:
we can have this:
src/index.ts
Outdated
|
|
||
| /* Types */ | ||
| export * from './internal/types'; | ||
| export { ConnectConfig } from './internal/operators/connect'; |
There was a problem hiding this comment.
While I think it makes sense that you put these here, it's probably better just to have them next to the operators they're with. Just to help show the relationship a little more clearly.
There was a problem hiding this comment.
@benlesh, since #6488 has been merged to master, I think it would be wise to move exported interfaces back to this file and keep them exported only here.
The first reason is to avoid duplication - we don't want to export stuff in two interfaces (also, dgeni tools don't like duplicated stuff; also duplication is hard to maintain - what if a new interface is added, would a creator of that interface know that it should be added to both files?).
The second reason, if they would remain in /src/operators/index.ts file: that file will most probably be removed, so we want to have all exported interfaces in one place before removal so we don't remove exported interfaces accidentally.
Please let me know your thoughts on this. Thanks.
| config: ThrottleConfig = defaultThrottleConfig | ||
| ): MonoTypeOperatorFunction<T> { | ||
| return operate((source, subscriber) => { | ||
| const { leading, trailing } = config; |
There was a problem hiding this comment.
interesting. Was this change necessary for documentation reasons? That's sort of bananas.
ddbac9e to
a1b9891
Compare
|
Included new const options: GroupByOptionsWithElement<string, string, string> = {
element: value => value.trim()
};
const grouped = groupBy(val => val, options);
const groupedLowerCase = groupBy(val => val.toLowerCase(), options); |
2eb75c4 to
a1b9891
Compare
niklas-wortmann
left a comment
There was a problem hiding this comment.
LGTM but I would like someone else from the team to have a look to make sure I am not missing something
Thanks @niklas-wortmann. I'm still waiting for @benlesh to confirm this. |


Description:
These types are exported so they can be included to the docs. I was thinking about where to include them, to
src/index.tsorsrc/operators/index.ts, but I chosesrc/index.ts. The reason is that on the API list page, we want to add exported interface to the index section, rather than to the operators section, like this:Another note: I added
TimeoutInfoto exports becauseTimeoutConfigis now being exported and it's got with property that usesTimeoutInfoas a callback property.Related issue (if exists):
Somewhat #6247 and a related comment.