angular-cn/tools/public_api_guard
cexbrayat 628b0c1154 feat(forms): formControlName also accepts a number (#30606)
This commit relaxes the type of the `formControlName` input to accept both a `string` and a `number`.

Currently, when using a `FormArray`, most templates look like:

```
<div formArrayName="tags">
  <div *ngFor="let tag of tagsArray.controls; index as i">
    <input [formControlName]="i">
  </div>
</div>
```

Here `formControlName` receives a number whereas its input type is a string.

This is fine for VE and `fullTemplateTypeCheck`, but not for Ivy which does a more thorough type checking on inputs with `fullTemplateTypeCheck` enabled and throws `Type 'number' is not assignable to type 'string'`. It is fixable by using `formControlName="{{i}}"` but you have to know the difference between `a="{{b}}"` and `[a]="b"` and change it all over the application codebase. This commit allows the existing code to still type-check.

PR Close #30606
2019-08-13 14:21:25 -07:00
..
animations docs: update animations to use `@publicApi` tags (#26595) 2018-10-19 14:35:53 -07:00
common build: TypeScript 3.5 upgrade (#31615) 2019-07-25 17:05:23 -07:00
core refactor(ivy): remove load instruction (#32067) 2019-08-12 12:55:18 -07:00
elements docs: update elements to use `@publicApi` tags (#26595) 2018-10-19 14:35:53 -07:00
forms feat(forms): formControlName also accepts a number (#30606) 2019-08-13 14:21:25 -07:00
http docs(http): move examples to `@usageNotes` (#26039) 2018-09-24 09:11:02 -07:00
platform-browser fix(platform-browser): debug element query predicates not compatible with strictFunctionTypes (#30993) 2019-07-18 14:21:26 -07:00
platform-browser-dynamic docs: update platform-browser-dynamic to use `@publicApi` tags (#26595) 2018-10-19 14:35:53 -07:00
platform-server docs: update platform-server to use `@publicApi` tags (#26595) 2018-10-19 14:35:53 -07:00
platform-webworker feat(platform-webworker): deprecate platform-webworker (#30642) 2019-05-23 15:09:48 -07:00
platform-webworker-dynamic feat(platform-webworker): deprecate platform-webworker (#30642) 2019-05-23 15:09:48 -07:00
router docs: clean up router api doc (#31476) 2019-07-18 10:33:17 -07:00
service-worker refactor(service-worker): DRY up SW registration logic (#21842) 2019-04-25 12:29:58 -07:00
upgrade feat(upgrade): provide unit test helpers for wiring up injectors (#16848) 2019-06-20 17:04:01 -07:00
BUILD.bazel refactor(upgrade): use Bazel packages to avoid symlinks in the source (#29466) 2019-04-02 10:38:01 -07:00
global_utils.d.ts refactor(ivy): remove all old styling code prior to refactor (#31193) 2019-07-23 15:45:32 -07:00
public_api_guard.bzl build(ivy): remove the remains of ivy-jit mode (#27278) 2018-11-27 10:30:58 -08:00