angular-cn/packages/compiler-cli/test/ngtsc
JoostK 51156f3f07 fix(core): allow proper type inference when `ngFor` is used with a `trackBy` function (#42692)
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
2021-07-13 14:08:05 -07:00
..
BUILD.bazel test(compiler-cli): load type declarations from fake_common (#41995) 2021-06-03 11:33:26 -07:00
component_indexing_spec.ts refactor(compiler-cli): update to use new file-system interfaces (#40281) 2021-01-08 09:34:44 -08:00
env.ts refactor(compiler-cli): ensure compatibility with noImplicitOverride (#42512) 2021-07-12 13:11:14 -07:00
incremental_error_spec.ts perf(compiler-cli): detect semantic changes and their effect on an incremental rebuild (#40947) 2021-03-08 08:41:19 -08:00
incremental_semantic_changes_spec.ts refactor(compiler-cli): Adjust generated TCB when checkTypeOfPipes is false (#40523) 2021-05-06 17:54:14 -04:00
incremental_spec.ts fix(compiler-cli): inline type checking instructions no longer prevent incremental reuse (#42759) 2021-07-07 15:17:25 -07:00
incremental_typecheck_spec.ts perf(compiler-cli): detect semantic changes and their effect on an incremental rebuild (#40947) 2021-03-08 08:41:19 -08:00
monorepo_spec.ts test(compiler-cli): move testing utils to separate package (#39594) 2020-11-17 11:59:56 -08:00
ngtsc_spec.ts Revert "test: update compiler-cli compliance goldens due to TS 4.3 emit format regression (#42022)" (#42600) 2021-06-21 16:42:48 +00:00
scope_spec.ts refactor(core): rename `...WithMeta` types to `...Declaration` and alias to `unknown` (#41119) 2021-03-22 08:57:18 -07:00
sourcemap_utils.ts fix(compiler-cli): update type castings for JSON.parse usage (#40710) 2021-02-09 10:48:43 -08:00
template_mapping_spec.ts refactor(compiler-cli): remove TS bug workaround (#42000) 2021-05-10 10:33:26 -04:00
template_typecheck_spec.ts fix(core): allow proper type inference when `ngFor` is used with a `trackBy` function (#42692) 2021-07-13 14:08:05 -07:00
xi18n_spec.ts refactor(compiler-cli): support xi18n in ngtsc (#42485) 2021-06-21 16:50:28 +00:00