-
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
chore(typings): Enabled noImplictAny #1077
Conversation
Appreciate for effort :) few copy-paste from original PR
I'll try to come up with possible cases of |
a46c668
to
87e642e
Compare
done! 😄
Build is erroring for Do we want to suppress those messages, or define the types so they don't happen? |
: Yes, those are errors I could see while I work on this, reason of suggestion for enabling |
I don't see much value in typing them, there aren't a lot of cases where Rx is using objects as a dictionary or similar (not when there is map, etc). I will update to suppress those messages then. |
@@ -35,9 +35,9 @@ export interface CoreOperators<T> { | |||
projectResult?: (x: T, y: any, ix: number, iy: number) => R, | |||
concurrent?: number) => Observable<R>; | |||
flatMapTo?: <R>(observable: Observable<any>, projectResult?: (x: T, y: any, ix: number, iy: number) => R, concurrent?: number) => Observable<R>; | |||
groupBy?: <R>(keySelector: (value: T) => string, | |||
groupBy?: <TKey, R>(keySelector: (value: T) => string, |
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.
As I suggested in #1050, I think it would be better to rename TKey
to K
here.
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.
It's the C# dev in me coming out. 😈
I don't care about naming semantics, updating the commit.
c6de270
to
c8e821c
Compare
@@ -63,11 +63,11 @@ export class Subject<T> extends Observable<T> implements Observer<T>, Subscripti | |||
return new SubjectSubscription(this, subscriber); | |||
} | |||
|
|||
add(subscription?) { | |||
add(subscription?: Subscription<T>) { |
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 may need to update this if #1065 gets merged first.
c8e821c
to
c4608c7
Compare
export var _void: void; |
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.
is this file has changed?
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 think it's line ending related. There are other files with the same 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.
Hrm... I'll see if I can figure out to avoid that line ending issue.
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.
Is there a standard with no newlines at the end of files for the project, or was just that how things happened to end up? (Just want to get it right! :) )
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'm not sure, but I think it's a bit messy at the moment.
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 don't think we currently have strict rules for those. Personally I clean up endings if I could find it in my changes, but in this case if file hasn't changed it'd better to unstage simply.
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 see the editor config, I'll fix that up.
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.
For this issue, I'll bring up small PR to introduce consistency.
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 gone and corrected the line endings that looked pretty obvious, it looks like some files have them and some don't so it's hard to know if it should or shouldn't lol
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.
some don't so it's hard to know if it should or shouldn't lol
: Yes, agreed. As commented above let me amend those. :)
I'm seeing some of function signatures are changed not related to implicit any, specifically |
@@ -19,7 +19,7 @@ class SampleSubscriber<T> extends Subscriber<T> { | |||
private lastValue: T; | |||
private hasValue: boolean = false; | |||
|
|||
constructor(destination: Subscriber<T>, private notifier: Observable<any>) { | |||
constructor(destination: Subscriber<T>, private notifier: any) { |
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.
notifier can be other type than observable
?
I haven't had a chance to check it, but it's possible it's not needed
|
Just a note: This PR should probably wait for @trxcllnt's changes (code reviewed in branch and PR incoming shortly) to the Subscription scheme to land. They're big changes, so it may mean a painful refactor of this PR... however, they're important changes to internals, so they take precedence. |
Agreed with @Blesh here. It wasn't intended to make this PR's check in delayed though, now it's overlaps with major refactoring to subscriptions - in this case, I'd like to let those changes land first prior to this. (Also #1097 as well @luisgabriel , current assumption's those PR's nearly orthogonal to subscription changes, but want to be sure). |
Ok, no problem. I was assuming that it would be less painful to adapt @trxcllnt's changes since merging this one after could also require adding explicit typing on the new code besides solving the conflicts. |
@david-driscoll the effort that went into this PR is clearly enormous, so thanks for that. Apologies if rebasing from #1106 is a major headache. I'll do the legwork to reconcile with this PR if necessary. |
#1106 's now landed, @david-driscoll would you able to rebase this? I'll take this as priority to check in once it's rebased, given size of changes delaying it more would create more change conflicts between PRs. (Just note : @luisgabriel , I'll take #1097 as second order after this one. Let me know if you have any suggestions). |
@kwonoj Ok, no problem from my side. I'll try to rebase this patch tomorrow to see if I can help @david-driscoll to update this PR. |
@david-driscoll I've rebased your patch on the current master. You can find it in this branch: https://github.com/luisgabriel/RxJS/tree/pr-1077 It was less painful than I thought. ;) |
The sooner we get the rebased version in the PR (or PR'ed elsewhere) the sooner we can review the changes again after the rebase and merge this. |
Marking "Blocked" as it's awaiting rebase. |
Will get working on this is in the next day or two, I've been enjoying some On Mon, Jan 4, 2016 at 3:14 PM Ben Lesh [email protected] wrote:
|
@david-driscoll I recommend you use https://github.com/luisgabriel/RxJS/tree/pr-1077 as a base for updating this PR. A lot of the conflicts are already solved in this branch. |
👍 also @Blesh, who's the masochist now? #517 (comment) |
@robwormald haha. Yeah, that was before I knew it would reduce the amount of time I'd have to wait for builds. 📦 |
2d0af04
to
db7f0b1
Compare
@luisgabriel sorry for the delay, life happens. Now fully rebased and building correctly. |
@david-driscoll No problem at all. Thank you for the effort! ;) |
return this.lift(new DistinctUntilChangedOperator(compare, keySelector)); | ||
export function distinctUntilChanged<T>(compare?: (x: T, y: T) => boolean): Observable<T>; | ||
export function distinctUntilChanged<T, K>(compare: (x: K, y: K) => boolean, keySelector?: (x: T) => K): Observable<T>; | ||
export function distinctUntilChanged<T, K>(compare: (x: K, y: K) => boolean, keySelector?: (x: T) => K): Observable<T> { |
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.
Is this correct?
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.
If you supply a keySelector
, then the values that get handed to compare, are the type that is returned by the keySelector
otherwise the values handed to compare are T
.
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.
Got it. Thanks.
LGTM 👍 |
Cool, I'm checking in this.. (finally!) |
Merged with db7f0b1. Appreciate @david-driscoll for this huge effort, and also @luisgabriel takes effort to review this changes too. |
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. |
With this change compliation time and performance is improved
@kwonoj This was the quick way, there might a few places where the formatting, or in some cases the variable names used in method signatures that have changed. If I need to reverse those let me know and I'll make a pass at it shortly.