angular/goldens/public-api/compiler-cli/error_code.md
Doug Parker 83e6db4081 refactor(compiler-cli): add validation to extended template diagnostics configuration (#44391)
Refs #42966.

This validates the `tsconfig.json` options for extended template diagnostics. It verifies:
* `strictTemplates` must be enabled if `extendedDiagnostics` have any explicit configuration.
* `extendedDiagnostics.defaultCategory` must be a valid `DiagnosticCategoryLabel`.
* `extendedDiagnostics.checks` keys must all be real diagnostics.
* `extendedDiagnostics.checks` values must all be valid `DiagnosticCategoryLabel`s.

These include new error codes, each of which prints out the exact property that was the issue and what the available options are to fix them.

It does disallow the config:

```json
{
  "angularCompilerOptions": {
    "strictTemplates": false,
    "extendedDiagnostics": {
      "defaultCategory": "suppress"
    }
  }
}
```

Such a configuration is technically valid and could be executed, but will be rejected by this verification logic. There isn't much reason to ever do this, since users could just drop `extendedDiagnostics` altogether and get the intended effect. This is unlikely to be a significant issue for users, so it is considered invalid for now to keep the implementation simple.

PR Close #44391
2022-01-11 17:33:16 +00:00

2.6 KiB

API Report File for "angular-srcs"

Do not edit this file. It is a report generated by API Extractor.


// @public (undocumented)
export enum ErrorCode {
    COMPONENT_INVALID_SHADOW_DOM_SELECTOR = 2009,
    // (undocumented)
    COMPONENT_MISSING_TEMPLATE = 2001,
    COMPONENT_RESOURCE_NOT_FOUND = 2008,
    // (undocumented)
    CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES = 4003,
    // (undocumented)
    CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL = 4004,
    // (undocumented)
    CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK = 4005,
    // (undocumented)
    CONFIG_FLAT_MODULE_NO_INDEX = 4001,
    // (undocumented)
    CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK = 4002,
    // (undocumented)
    DECORATOR_ARG_NOT_LITERAL = 1001,
    // (undocumented)
    DECORATOR_ARITY_WRONG = 1002,
    DECORATOR_COLLISION = 1006,
    // (undocumented)
    DECORATOR_NOT_CALLED = 1003,
    // (undocumented)
    DECORATOR_ON_ANONYMOUS_CLASS = 1004,
    // (undocumented)
    DECORATOR_UNEXPECTED = 1005,
    DIRECTIVE_INHERITS_UNDECORATED_CTOR = 2006,
    // (undocumented)
    DIRECTIVE_MISSING_SELECTOR = 2004,
    DUPLICATE_VARIABLE_DECLARATION = 8006,
    HOST_BINDING_PARSE_ERROR = 5001,
    IMPORT_CYCLE_DETECTED = 3003,
    IMPORT_GENERATION_FAILURE = 3004,
    INJECTABLE_DUPLICATE_PROV = 9001,
    INLINE_TCB_REQUIRED = 8900,
    INLINE_TYPE_CTOR_REQUIRED = 8901,
    INVALID_BANANA_IN_BOX = 8101,
    MISSING_PIPE = 8004,
    MISSING_REFERENCE_TARGET = 8003,
    NGMODULE_DECLARATION_NOT_UNIQUE = 6007,
    NGMODULE_INVALID_DECLARATION = 6001,
    NGMODULE_INVALID_EXPORT = 6003,
    NGMODULE_INVALID_IMPORT = 6002,
    NGMODULE_INVALID_REEXPORT = 6004,
    NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC = 6005,
    NGMODULE_REEXPORT_NAME_COLLISION = 6006,
    NGMODULE_VE_DEPENDENCY_ON_IVY_LIB = 6999,
    NULLISH_COALESCING_NOT_NULLABLE = 8102,
    // (undocumented)
    PARAM_MISSING_TOKEN = 2003,
    // (undocumented)
    PIPE_MISSING_NAME = 2002,
    SCHEMA_INVALID_ATTRIBUTE = 8002,
    SCHEMA_INVALID_ELEMENT = 8001,
    SPLIT_TWO_WAY_BINDING = 8007,
    SUGGEST_STRICT_TEMPLATES = 10001,
    SUGGEST_SUBOPTIMAL_TYPE_INFERENCE = 10002,
    // (undocumented)
    SYMBOL_EXPORTED_UNDER_DIFFERENT_NAME = 3002,
    // (undocumented)
    SYMBOL_NOT_EXPORTED = 3001,
    TEMPLATE_PARSE_ERROR = 5002,
    UNDECORATED_CLASS_USING_ANGULAR_FEATURES = 2007,
    UNDECORATED_PROVIDER = 2005,
    // (undocumented)
    VALUE_HAS_WRONG_TYPE = 1010,
    // (undocumented)
    VALUE_NOT_LITERAL = 1011,
    WRITE_TO_READ_ONLY_VARIABLE = 8005
}

// (No @packageDocumentation comment for this package)