-
Notifications
You must be signed in to change notification settings - Fork 62
docs(operators): add documentation for operator do #167
Conversation
Codecov Report
@@ Coverage Diff @@
## master #167 +/- ##
=======================================
Coverage 85.71% 85.71%
=======================================
Files 8 8
Lines 91 91
Branches 4 4
=======================================
Hits 78 78
Misses 13 13 Continue to review full report at Codecov.
|
name: 'do', | ||
operatorType: 'utility', | ||
signature: | ||
'public do(nextOrObserver: Observer | function, error: function, complete: function): Observable', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could mark the optional parameters with a question mark:
public do(nextOrObserver?: Observer | function, error?: function, complete?: function): Observable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you it will be better to have a distinctive mark for optional parameters. My only concern is that this is inconsistent with the rest of the document. I think you should make this as a suggestion for the full documentation, then all contributors can follow it as a rule.
Right now, I don't think I should be the only one making this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've opened #168 which encompass this suggestion with others.
src/operator-docs/utility/do.ts
Outdated
}, | ||
walkthrough: { | ||
description: ` | ||
<p><code>do</code> Returns a mirrored Observable of the source Observable, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
returns (without the R)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, will do that.
Thank you @mustafamg for your contribs and thank you @feloy for your code review! :) @sumitarora @ashwin-sureshkumar @btroncone if any of y'all have time to review this! |
`, | ||
externalLink: { | ||
platform: 'JSBin', | ||
url: 'http://jsbin.com/mikiqub/edit?js,console,output' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just one small change. Instead of logging whole event in js bin which outputs the whole event details in jsbin.
[object MouseEvent] {
altKey: false,
AT_TARGET: 2,
bubbles: true,
BUBBLING_PHASE: 3,
button: 0,
buttons: 0,
cancelable: true,
cancelBubble: false,
CAPTURING_PHASE: 1,
clientX: 182,
clientY: 292,
composed: true,
composedPath: function composedPath() { [native code] },
ctrlKey: false,
currentTarget: [object HTMLDocument] {
activeElement: [object HTMLBodyElement] { ... },
addEventListener: function addEventListener() { [native code] },
adoptNode: function adoptNode() { [native code] },
Could you just do event type. .do(ev => console.log(ev))
to .do(ev => console.log(ev.type))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, thanks for the comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
closes #131