-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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(core): compile core cleanly with TypeScript 2.4 #18457
Conversation
You can preview 600e8ab at https://pr18457-600e8ab.ngbuilds.io/. |
You can preview 62ad432 at https://pr18457-62ad432.ngbuilds.io/. |
@@ -63,8 +63,9 @@ export interface IterableChanges<V> { | |||
* of the item, after applying the operations up to this point. | |||
*/ | |||
forEachOperation( | |||
fn: (record: IterableChangeRecord<V>, previousIndex: number, currentIndex: number) => void): | |||
void; | |||
fn: |
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.
Looks like a breaking 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.
This it is more accurate typing on what the code will actually do. This might introduce a new compiler error but it will point out real problems in the code.
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.
the rest looks good.
@@ -513,7 +513,7 @@ export interface IterableChanges<V> { | |||
forEachIdentityChange(fn: (record: IterableChangeRecord<V>) => void): void; | |||
forEachItem(fn: (record: IterableChangeRecord<V>) => void): void; | |||
forEachMovedItem(fn: (record: IterableChangeRecord<V>) => void): void; | |||
forEachOperation(fn: (record: IterableChangeRecord<V>, previousIndex: number, currentIndex: number) => void): void; | |||
forEachOperation(fn: (record: IterableChangeRecord<V>, previousIndex: number | null, currentIndex: number | null) => 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.
how can the currentIndex
be null? that doesn't look 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.
Do you mean that it should never be null? Because apparently (see #17863 (comment)) the compiler sometimes assumes that it may be null?
I.e. do you mean that there is a bug on the calling side(s), that should be fixed instead of the API as proposed here?
Obsolete. The deprecated default iterable differ was removed. |
@chuckjaz I am very eager to get this problem fixed in a patch release to 4.x... Will this happen now that the PR is closed ? |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes: #17863
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The core package does not compile cleanly with TypeScript 2.4.
Issue Number: #17863, #18454
What is the new behavior?
The core package compiles cleanly with TypeScript 2.4.
Does this PR introduce a breaking change?