3c726c3516
TypeScript supports ECMAScript private identifiers. It can happen that developers intend to access such members from within an expression. This currently results in an unclear error from the lexer. e.g. ``` 'Parser Error: Unexpected token # at column 1 in [{{#myField}}] in C:/test.ts@5:2 ``` We could improve such errors by tokenizing private identifiers similar to how the TypeScript scanner processes them. Later we can report better errors in the expression parser or in the typecheck block. This commit causes all private identifier tokens to be disallowed, so it never reaches the type checker. This is done intentionally as private identifiers should not be considered valid Angular syntax, especially because private fields are not guaranteed to be accessible from within a component/directive definition (e.g. there cases where a template function is generated outside of the class; which results in private members not being accessible; and this results in mixed/confusing behavior). Fixes #36003. PR Close #42027 |
||
---|---|---|
.. | ||
design | ||
src | ||
test | ||
testing | ||
BUILD.bazel | ||
compiler.ts | ||
index.ts | ||
package.json | ||
public_api.ts |