Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…ngular#53571) Consider a snippet like: ``` const x = directiveDef.inputs || EMPTY_OBJ ``` this currently results in `x` being inferred as just `{}`- ending up turning of potential future assignment checks. This surfaced in the `DirectiveDefinition` -> `DirectiveDef` conversion. Note: This has the effect that assigning `EMPTY_OBJ` to a field of anything would _always_ pass. It's questionable if this rather impacts type-safety in a more negative way. There seem to be trade-offs in both ways... Maybe worth considering just using `{}` directly as fallbacks in some places, and treating this as an unique symbol?! https://www.typescriptlang.org/play?#code/MYewdgzgLgBAHgLhmApgNxQJxgXhgbwF8YBDCZdLAbgCgbRJYAHJfGmDmAGxC6SkwBXFABoahAD6CwAExQAzAJaoZuZIK5dS5EmACeteuGgxBapjAkT4VIA PR Close angular#53571
- Loading branch information