angular/projects
AleksanderBodurri 1b97432960 fix(devtools): update typing of differ objects to fit the new contract of TrackByFunction (rangle/angular-devtools#862)
Previously `DefaultIterableDiffer` was able to infer the type of it's generic by reading the type contract defined by the user defined trackBy function. This was because `TrackByFunction` can be specified with a generic that is used to type its second argument. If this generic is not provided, like in this case, typescript infers this type from the function contract directly. In this case this inferred type was `FlatNode`. This inference is then propagated to `DefaultIterableDiffer`, which is why we were not seeing this error previously.

A change in the framework made it so the second argument of `TrackByFunction` is typed as a generic that extends the generic passed into `TrackByFunction`. Since we had not previously passed in this generic to `TrackByFunction`, this type was inferred as an extension of `unknown`, causing a type error when passed as an argument to the `DefaultIterableDiffer` constructor.

Now the functions being used are typed directly as `TrackByFunction<FlatNode>`

For clarity, the `DefaultIterableDiffer` generic is now also typed as `FlatNode`.

See https://github.com/angular/angular/pull/41995 for the framework change.
2021-06-21 17:56:43 -07:00
..
demo-no-zone ci(devtools): fix flaky tests using cypress orb (rangle/angular-devtools#733) 2021-05-23 11:39:48 -07:00
ng-devtools fix(devtools): update typing of differ objects to fit the new contract of TrackByFunction (rangle/angular-devtools#862) 2021-06-21 17:56:43 -07:00
ng-devtools-backend fix(devtools): show properly dynamically inserted content with DOM APIs (rangle/angular-devtools#828) 2021-05-27 22:54:52 -07:00
protocol ci(devtools): fix flaky tests using cypress orb (rangle/angular-devtools#733) 2021-05-23 11:39:48 -07:00
shared-utils ci(devtools): fix flaky tests using cypress orb (rangle/angular-devtools#733) 2021-05-23 11:39:48 -07:00
shell-chrome refactor(devtools): switch to sass use and new angular material theming API (rangle/angular-devtools#853) 2021-06-16 15:18:12 -07:00