Alex Rickabaugh
628f957c4a
fix(ivy): add strictLiteralTypes to align Ivy + VE checking of literals ( #35462 )
...
Under View Engine's default (non-fullTemplateTypeCheck) checking, object and
array literals which appear in templates are treated as having type `any`.
This allows a number of patterns which would not otherwise compile, such as
indexing an object literal by a string:
```html
{{ {'a': 1, 'b': 2}[value] }}
```
(where `value` is `string`)
Ivy, meanwhile, has always inferred strong types for object literals, even
in its compatibility mode. This commit fixes the bug, and adds the
`strictLiteralTypes` flag to specifically control this inference. When the
flag is `false` (in compatibility mode), object and array literals receive
the `any` type.
PR Close #35462
2020-02-21 12:36:12 -08:00
..
2019-09-10 13:11:48 -04:00
2020-01-10 08:38:54 -08:00
2020-02-04 10:43:34 -08:00
2019-11-14 09:27:02 -08:00
2020-02-13 13:31:31 -08:00
2020-02-04 10:43:34 -08:00
2019-10-21 11:25:44 -04:00
2019-11-14 09:27:02 -08:00
2019-11-14 09:27:02 -08:00
2020-02-20 10:50:06 -08:00
2019-11-14 09:27:02 -08:00
2020-02-04 08:57:32 -08:00
2020-01-28 13:04:26 -08:00
2019-11-04 20:07:37 +00:00
2019-12-09 11:36:36 -08:00
2020-01-27 10:46:27 -08:00
2019-12-10 09:18:18 -08:00
2019-07-16 23:57:50 -04:00
2020-01-27 10:50:53 -08:00
2020-01-21 13:14:46 -05:00
2019-10-29 11:39:17 -07:00
2020-01-10 08:38:54 -08:00
2020-01-10 08:38:54 -08:00
2020-02-07 13:57:18 -08:00
2020-01-21 13:03:05 -05:00
2019-11-14 09:27:02 -08:00
2020-01-21 13:02:29 -05:00
2020-01-10 08:38:54 -08:00
2020-01-30 10:20:20 -08:00
2020-01-14 10:24:56 -08:00
2020-02-20 10:50:06 -08:00
2020-01-10 08:38:54 -08:00
2020-01-10 08:38:54 -08:00
2020-01-10 08:38:54 -08:00
2020-01-10 08:38:54 -08:00
2020-01-10 08:38:54 -08:00
2020-01-10 08:38:54 -08:00
2019-11-13 11:08:51 -08:00
2020-01-10 08:38:54 -08:00
2019-11-14 09:27:02 -08:00
2019-11-14 09:27:02 -08:00
2020-01-10 08:38:54 -08:00
2020-02-07 09:57:26 -08:00
2020-02-07 09:58:32 -08:00
2019-11-22 12:36:43 -05:00
2019-12-03 10:14:15 -08:00
2020-01-10 08:38:54 -08:00
2020-02-07 09:56:38 -08:00
2020-01-27 10:50:53 -08:00
2019-11-14 09:27:02 -08:00
2020-01-10 08:38:54 -08:00
2020-01-10 08:38:54 -08:00
2020-01-10 08:38:54 -08:00
2019-12-05 13:06:02 -08:00
2019-12-05 13:06:02 -08:00
2019-12-05 13:06:02 -08:00
2020-01-10 08:38:54 -08:00
2019-12-05 13:06:02 -08:00
2020-01-10 08:38:54 -08:00
2020-01-10 08:38:54 -08:00
2019-07-17 13:26:00 -04:00
2020-01-10 08:38:54 -08:00
2020-01-10 08:38:54 -08:00
2019-07-24 14:38:54 -07:00
2019-12-10 09:17:13 -08:00
2019-10-31 22:21:00 +00:00
2020-01-16 12:06:25 -05:00
2019-11-14 09:27:02 -08:00
2018-10-17 11:05:29 -07:00
2020-01-13 07:20:25 -08:00
2020-01-10 08:38:54 -08:00
2020-02-13 10:00:52 -08:00
2019-10-29 11:39:17 -07:00
2020-02-06 15:31:43 -08:00
2020-01-22 14:32:57 -08:00
2019-08-08 12:15:29 -07:00
2020-01-10 08:38:54 -08:00
2020-01-10 08:38:54 -08:00
2019-12-02 11:26:21 -08:00
2019-11-21 16:57:13 -05:00
2019-07-24 14:38:54 -07:00
2019-12-03 10:42:08 -08:00
2019-10-21 16:50:52 -04:00
2019-11-14 09:27:02 -08:00
2019-08-26 15:03:04 -07:00
2020-01-10 08:38:54 -08:00
2020-01-29 13:10:27 -08:00
2020-01-10 08:38:54 -08:00
2019-08-27 09:07:18 -07:00
2020-01-13 07:21:43 -08:00
2020-02-07 11:32:38 -08:00
2020-01-10 08:38:54 -08:00
2020-02-14 11:15:07 -08:00
2020-02-21 12:36:12 -08:00
2020-02-20 15:15:00 -08:00
2020-02-04 08:58:05 -08:00
2020-01-10 08:38:54 -08:00
2020-02-07 09:58:32 -08:00
2020-02-07 09:57:57 -08:00
2020-02-06 14:29:21 -08:00
2020-01-10 08:38:54 -08:00
2020-01-10 08:38:54 -08:00
2020-02-20 10:55:35 -08:00
2020-01-10 08:38:54 -08:00
2020-01-10 08:38:54 -08:00
2019-10-29 11:39:17 -07:00
2020-01-10 08:38:54 -08:00
2020-01-10 08:38:54 -08:00