2021-06-28 17:54:20 +00:00
|
|
|
## API Report File for "angular-srcs"
|
|
|
|
|
|
|
|
|
|
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
|
|
|
|
|
|
|
|
```ts
|
|
|
|
|
|
|
|
|
|
// @public (undocumented)
|
|
|
|
|
export enum ErrorCode {
|
2022-01-10 19:57:41 +00:00
|
|
|
COMPONENT_IMPORT_NOT_STANDALONE = 2011,
|
2021-06-28 17:54:20 +00:00
|
|
|
COMPONENT_INVALID_SHADOW_DOM_SELECTOR = 2009,
|
2023-09-11 11:56:37 +00:00
|
|
|
COMPONENT_INVALID_STYLE_URLS = 2021,
|
2021-06-28 17:54:20 +00:00
|
|
|
// (undocumented)
|
|
|
|
|
COMPONENT_MISSING_TEMPLATE = 2001,
|
2022-01-10 19:57:41 +00:00
|
|
|
COMPONENT_NOT_STANDALONE = 2010,
|
2021-06-28 17:54:20 +00:00
|
|
|
COMPONENT_RESOURCE_NOT_FOUND = 2008,
|
2023-12-15 20:03:01 +00:00
|
|
|
COMPONENT_UNKNOWN_DEFERRED_IMPORT = 2022,
|
2022-01-10 19:57:41 +00:00
|
|
|
COMPONENT_UNKNOWN_IMPORT = 2012,
|
2021-06-28 17:54:20 +00:00
|
|
|
// (undocumented)
|
2021-12-04 03:17:30 +00:00
|
|
|
CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES = 4003,
|
|
|
|
|
// (undocumented)
|
|
|
|
|
CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL = 4004,
|
|
|
|
|
// (undocumented)
|
|
|
|
|
CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK = 4005,
|
|
|
|
|
// (undocumented)
|
2021-06-28 17:54:20 +00:00
|
|
|
CONFIG_FLAT_MODULE_NO_INDEX = 4001,
|
|
|
|
|
// (undocumented)
|
|
|
|
|
CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK = 4002,
|
2023-05-10 07:37:57 +00:00
|
|
|
CONFLICTING_INPUT_TRANSFORM = 2020,
|
2024-06-28 12:35:54 +00:00
|
|
|
CONFLICTING_LET_DECLARATION = 8017,
|
2023-11-27 09:29:20 +00:00
|
|
|
CONTROL_FLOW_PREVENTING_CONTENT_PROJECTION = 8011,
|
2021-06-28 17:54:20 +00:00
|
|
|
// (undocumented)
|
2020-01-30 21:04:17 +00:00
|
|
|
DECORATOR_ARG_NOT_LITERAL = 1001,
|
2021-06-28 17:54:20 +00:00
|
|
|
// (undocumented)
|
2020-01-30 21:04:17 +00:00
|
|
|
DECORATOR_ARITY_WRONG = 1002,
|
2021-06-28 17:54:20 +00:00
|
|
|
DECORATOR_COLLISION = 1006,
|
|
|
|
|
// (undocumented)
|
2020-01-30 21:04:17 +00:00
|
|
|
DECORATOR_NOT_CALLED = 1003,
|
2021-06-28 17:54:20 +00:00
|
|
|
// (undocumented)
|
2020-01-30 21:04:17 +00:00
|
|
|
DECORATOR_UNEXPECTED = 1005,
|
2023-12-15 20:03:01 +00:00
|
|
|
DEFERRED_DEPENDENCY_IMPORTED_EAGERLY = 8014,
|
|
|
|
|
DEFERRED_DIRECTIVE_USED_EAGERLY = 8013,
|
|
|
|
|
DEFERRED_PIPE_USED_EAGERLY = 8012,
|
2020-01-30 21:04:17 +00:00
|
|
|
DIRECTIVE_INHERITS_UNDECORATED_CTOR = 2006,
|
2021-06-28 17:54:20 +00:00
|
|
|
// (undocumented)
|
|
|
|
|
DIRECTIVE_MISSING_SELECTOR = 2004,
|
2025-03-13 18:01:14 +00:00
|
|
|
// (undocumented)
|
|
|
|
|
DUPLICATE_DECORATED_PROPERTIES = 1012,
|
2021-06-28 17:54:20 +00:00
|
|
|
DUPLICATE_VARIABLE_DECLARATION = 8006,
|
2020-01-30 21:04:17 +00:00
|
|
|
HOST_BINDING_PARSE_ERROR = 5001,
|
2022-07-22 11:33:09 +00:00
|
|
|
HOST_DIRECTIVE_COMPONENT = 2015,
|
2022-10-14 08:01:07 +00:00
|
|
|
HOST_DIRECTIVE_CONFLICTING_ALIAS = 2018,
|
2022-07-22 11:33:09 +00:00
|
|
|
HOST_DIRECTIVE_INVALID = 2013,
|
2023-03-17 19:15:08 +00:00
|
|
|
HOST_DIRECTIVE_MISSING_REQUIRED_BINDING = 2019,
|
2022-07-22 11:33:09 +00:00
|
|
|
HOST_DIRECTIVE_NOT_STANDALONE = 2014,
|
2022-10-14 08:01:07 +00:00
|
|
|
HOST_DIRECTIVE_UNDEFINED_BINDING = 2017,
|
2023-09-07 11:49:12 +00:00
|
|
|
ILLEGAL_FOR_LOOP_TRACK_ACCESS = 8009,
|
2024-05-03 07:58:40 +00:00
|
|
|
ILLEGAL_LET_WRITE = 8015,
|
2021-06-28 17:54:20 +00:00
|
|
|
IMPORT_CYCLE_DETECTED = 3003,
|
2021-12-29 22:11:18 +00:00
|
|
|
IMPORT_GENERATION_FAILURE = 3004,
|
2023-09-27 08:00:24 +00:00
|
|
|
INACCESSIBLE_DEFERRED_TRIGGER_ELEMENT = 8010,
|
2024-01-22 12:57:09 +00:00
|
|
|
INCORRECTLY_DECLARED_ON_STATIC_MEMBER = 1100,
|
|
|
|
|
INITIALIZER_API_DECORATOR_METADATA_COLLISION = 1051,
|
2024-03-21 16:05:34 +00:00
|
|
|
INITIALIZER_API_DISALLOWED_MEMBER_VISIBILITY = 1053,
|
2024-02-02 14:26:52 +00:00
|
|
|
INITIALIZER_API_NO_REQUIRED_FUNCTION = 1052,
|
2024-01-22 12:57:09 +00:00
|
|
|
INITIALIZER_API_WITH_DISALLOWED_DECORATOR = 1050,
|
2021-06-28 17:54:20 +00:00
|
|
|
INJECTABLE_DUPLICATE_PROV = 9001,
|
fix(compiler-cli): exclude abstract classes from `strictInjectionParameters` requirement (#44615)
In AOT compilations, the `strictInjectionParameters` compiler option can
be enabled to report errors when an `@Injectable` annotated class has a
constructor with parameters that do not provide an injection token, e.g.
only a primitive type or interface.
Since Ivy it's become required that any class with Angular behavior
(e.g. the `ngOnDestroy` lifecycle hook) is decorated using an Angular
decorator, which meant that `@Injectable()` may need to have been added
to abstract base classes. Doing so would then report an error if
`strictInjectionParameters` is enabled, if the abstract class has an
incompatible constructor for DI purposes. This may be fine though, as
a subclass may call the constructor explicitly without relying on
Angular's DI mechanism.
Therefore, this commit excludes abstract classes from the
`strictInjectionParameters` check. This avoids an error from being
reported at compile time. If the constructor ends up being used by
Angular's DI system at runtime, then the factory function of the
abstract class will throw an error by means of the `ɵɵinvalidFactory`
instruction.
In addition to the runtime error, this commit also analyzes the inheritance
chain of an injectable without a constructor to verify that their inherited
constructor is valid.
BREAKING CHANGE: Invalid constructors for DI may now report compilation errors
When a class inherits its constructor from a base class, the compiler may now
report an error when that constructor cannot be used for DI purposes. This may
either be because the base class is missing an Angular decorator such as
`@Injectable()` or `@Directive()`, or because the constructor contains parameters
which do not have an associated token (such as primitive types like `string`).
These situations used to behave unexpectedly at runtime, where the class may be
constructed without any of its constructor parameters, so this is now reported
as an error during compilation.
Any new errors that may be reported because of this change can be resolved either
by decorating the base class from which the constructor is inherited, or by adding
an explicit constructor to the class for which the error is reported.
Closes #37914
PR Close #44615
2022-01-04 18:03:30 +00:00
|
|
|
INJECTABLE_INHERITS_INVALID_CONSTRUCTOR = 2016,
|
2021-06-28 17:54:20 +00:00
|
|
|
INLINE_TCB_REQUIRED = 8900,
|
|
|
|
|
INLINE_TYPE_CTOR_REQUIRED = 8901,
|
2023-03-31 16:22:28 +00:00
|
|
|
INTERPOLATED_SIGNAL_NOT_INVOKED = 8109,
|
2021-07-26 18:21:46 +00:00
|
|
|
INVALID_BANANA_IN_BOX = 8101,
|
2024-05-03 07:58:40 +00:00
|
|
|
LET_USED_BEFORE_DEFINITION = 8016,
|
2024-02-03 06:36:19 +00:00
|
|
|
LOCAL_COMPILATION_UNRESOLVED_CONST = 11001,
|
2024-02-09 16:00:19 +00:00
|
|
|
LOCAL_COMPILATION_UNSUPPORTED_EXPRESSION = 11003,
|
2022-05-25 23:58:13 +00:00
|
|
|
MISSING_CONTROL_FLOW_DIRECTIVE = 8103,
|
2022-07-02 00:07:34 +00:00
|
|
|
MISSING_NGFOROF_LET = 8105,
|
2021-06-28 17:54:20 +00:00
|
|
|
MISSING_PIPE = 8004,
|
|
|
|
|
MISSING_REFERENCE_TARGET = 8003,
|
2023-03-17 19:15:08 +00:00
|
|
|
MISSING_REQUIRED_INPUTS = 8008,
|
2022-04-30 01:00:05 +00:00
|
|
|
NGMODULE_BOOTSTRAP_IS_STANDALONE = 6009,
|
2022-01-10 19:57:41 +00:00
|
|
|
NGMODULE_DECLARATION_IS_STANDALONE = 6008,
|
2021-06-28 17:54:20 +00:00
|
|
|
NGMODULE_DECLARATION_NOT_UNIQUE = 6007,
|
2020-01-30 21:04:17 +00:00
|
|
|
NGMODULE_INVALID_DECLARATION = 6001,
|
|
|
|
|
NGMODULE_INVALID_EXPORT = 6003,
|
2021-06-28 17:54:20 +00:00
|
|
|
NGMODULE_INVALID_IMPORT = 6002,
|
2020-01-30 21:04:17 +00:00
|
|
|
NGMODULE_INVALID_REEXPORT = 6004,
|
|
|
|
|
NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC = 6005,
|
|
|
|
|
NGMODULE_REEXPORT_NAME_COLLISION = 6006,
|
2024-09-23 22:20:57 +00:00
|
|
|
NON_STANDALONE_NOT_ALLOWED = 2023,
|
2021-08-13 19:46:00 +00:00
|
|
|
NULLISH_COALESCING_NOT_NULLABLE = 8102,
|
2022-07-02 16:25:42 +00:00
|
|
|
OPTIONAL_CHAIN_NOT_NULLABLE = 8107,
|
2021-06-28 17:54:20 +00:00
|
|
|
// (undocumented)
|
|
|
|
|
PARAM_MISSING_TOKEN = 2003,
|
|
|
|
|
// (undocumented)
|
|
|
|
|
PIPE_MISSING_NAME = 2002,
|
2020-01-30 21:04:17 +00:00
|
|
|
SCHEMA_INVALID_ATTRIBUTE = 8002,
|
2021-06-28 17:54:20 +00:00
|
|
|
SCHEMA_INVALID_ELEMENT = 8001,
|
2023-03-21 12:24:08 +00:00
|
|
|
SKIP_HYDRATION_NOT_STATIC = 8108,
|
2021-06-22 15:48:27 +00:00
|
|
|
SPLIT_TWO_WAY_BINDING = 8007,
|
2022-06-30 20:10:34 +00:00
|
|
|
SUFFIX_NOT_SUPPORTED = 8106,
|
fix(language-service): show suggestion when type inference is suboptimal (#41072)
The Ivy Language Service uses the compiler's template type-checking engine,
which honors the configuration in the user's tsconfig.json. We recommend
that users upgrade to `strictTemplates` mode in their projects to take
advantage of the best possible type inference, and thus to have the best
experience in Language Service.
If a project is not using `strictTemplates`, then the compiler will not
leverage certain type inference options it has. One case where this is very
noticeable is the inference of let- variables for structural directives that
provide a template context guard (such as NgFor). Without `strictTemplates`,
these guards will not be applied and such variables will be inferred as
'any', degrading the user experience within Language Service.
This is working as designed, since the Language Service _should_ reflect
types exactly as the compiler sees them. However, the View Engine Language
Service used its own type system that _would_ infer these types even when
the compiler did not. As a result, it's confusing to some users why the
Ivy Language Service has "worse" type inference.
To address this confusion, this commit implements a suggestion diagnostic
which is shown in the Language Service for variables which could have been
narrowed via a context guard, but the type checking configuration didn't
allow it. This should make the reason why variables receive the 'any' type
as well as the action needed to improve the typings much more obvious,
improving the Language Service experience.
Fixes angular/vscode-ng-language-service#1155
Closes #41042
PR Close #41072
2021-03-03 23:06:21 +00:00
|
|
|
SUGGEST_STRICT_TEMPLATES = 10001,
|
2021-06-28 17:54:20 +00:00
|
|
|
SUGGEST_SUBOPTIMAL_TYPE_INFERENCE = 10002,
|
|
|
|
|
// (undocumented)
|
|
|
|
|
SYMBOL_NOT_EXPORTED = 3001,
|
|
|
|
|
TEMPLATE_PARSE_ERROR = 5002,
|
2022-05-26 20:12:31 +00:00
|
|
|
TEXT_ATTRIBUTE_NOT_BINDING = 8104,
|
2021-06-28 17:54:20 +00:00
|
|
|
UNDECORATED_CLASS_USING_ANGULAR_FEATURES = 2007,
|
|
|
|
|
UNDECORATED_PROVIDER = 2005,
|
2024-06-05 23:57:09 +00:00
|
|
|
UNINVOKED_FUNCTION_IN_EVENT_BINDING = 8111,
|
2025-03-20 20:02:05 +00:00
|
|
|
UNINVOKED_TRACK_FUNCTION = 8115,
|
2025-03-07 17:28:41 +00:00
|
|
|
UNPARENTHESIZED_NULLISH_COALESCING = 8114,
|
2024-03-28 08:28:10 +00:00
|
|
|
UNSUPPORTED_INITIALIZER_API_USAGE = 8110,
|
2024-07-23 04:19:37 +00:00
|
|
|
UNUSED_LET_DECLARATION = 8112,
|
2024-09-03 19:17:33 +00:00
|
|
|
UNUSED_STANDALONE_IMPORTS = 8113,
|
2021-06-28 17:54:20 +00:00
|
|
|
// (undocumented)
|
|
|
|
|
VALUE_HAS_WRONG_TYPE = 1010,
|
|
|
|
|
// (undocumented)
|
|
|
|
|
VALUE_NOT_LITERAL = 1011,
|
2022-02-09 01:09:20 +00:00
|
|
|
WARN_NGMODULE_ID_UNNECESSARY = 6100,
|
2021-06-28 17:54:20 +00:00
|
|
|
WRITE_TO_READ_ONLY_VARIABLE = 8005
|
2020-01-30 21:04:17 +00:00
|
|
|
}
|
2021-06-28 17:54:20 +00:00
|
|
|
|
|
|
|
|
// (No @packageDocumentation comment for this package)
|
|
|
|
|
|
|
|
|
|
```
|