mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
In #41995 the type of `TrackByFunction` was changed such that the declaration of a `trackBy` function did not cause the item type to be widened to the `trackBy`'s item type, which may be a supertype of the iterated type. This has introduced situations where the template type checker is now reporting errors for cases where a `trackBy` function is no longer assignable to `TrackByFunction`. This commit fixes the error by also including the item type `T` in addition to the constrained type parameter `U`, allowing TypeScript to infer an appropriate `T`. Fixes #42609 PR Close #42692 |
||
|---|---|---|
| .. | ||
| BUILD.bazel | ||
| component_indexing_spec.ts | ||
| env.ts | ||
| incremental_error_spec.ts | ||
| incremental_semantic_changes_spec.ts | ||
| incremental_spec.ts | ||
| incremental_typecheck_spec.ts | ||
| monorepo_spec.ts | ||
| ngtsc_spec.ts | ||
| scope_spec.ts | ||
| sourcemap_utils.ts | ||
| template_mapping_spec.ts | ||
| template_typecheck_spec.ts | ||
| xi18n_spec.ts | ||