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

fix(operator/do): fix typings #2022

Merged
merged 2 commits into from
Oct 19, 2016
Merged

Conversation

Brooooooklyn
Copy link
Contributor

@Brooooooklyn Brooooooklyn commented Oct 11, 2016

Description:

Observable.of('abc')
  .do(v => {
    // type of v is { } here
    console.log(v.substr(2))
  })

Related issue (if exists):

@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.039% when pulling 448c4e0 on Brooooooklyn:issue/do-type into 1bee98a on ReactiveX:master.

@kwonoj
Copy link
Member

kwonoj commented Oct 11, 2016

This looks ok to me, @david-driscoll is this caused by script running? or current state is expected?

@benlesh
Copy link
Member

benlesh commented Oct 11, 2016

This looks fine to me, pending @david-driscoll's approval (because it's typings related)

Copy link
Member

@david-driscoll david-driscoll left a comment

Choose a reason for hiding this comment

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

One more change, then this is good.

@@ -48,7 +48,7 @@ import { TeardownLogic } from '../Subscription';
* @owner Observable
*/
/* tslint:disable:max-line-length */
export function _do<T>(next: (x: T) => void, error?: (e: any) => void, complete?: (this: Observable<T>) => void): Observable<T>;
export function _do<T>(this: Observable<T>, next: (x: T) => void, error?: (e: any) => void, complete?: (this: Observable<T>) => void): Observable<T>;
Copy link
Member

Choose a reason for hiding this comment

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

definitely something I missed with the script. This needs to be changed slightly, note the additional this: Observable<T> .

complete?: (this: Observable<T>) => void should be changed back to complete?: () => void

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.039% when pulling 9a40297 on Brooooooklyn:issue/do-type into 1bee98a on ReactiveX:master.

@david-driscoll
Copy link
Member

LGTM

@coveralls
Copy link

coveralls commented Oct 19, 2016

Coverage Status

Coverage remained the same at 97.041% when pulling 910c3fe on Brooooooklyn:issue/do-type into 5460e77 on ReactiveX:master.

@kwonoj
Copy link
Member

kwonoj commented Oct 19, 2016

LGTM

@lock
Copy link

lock bot commented Jun 6, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants