angular/goldens/public-api/compiler-cli/error_code.md
Alex Rickabaugh 8155428ba6 perf(compiler-cli): ignore the module.id anti-pattern for NgModule ids (#45024)
In early versions of Angular, it was sometimes necessary to provide a
`moduleId` to `@Component` metadata, and the common pattern for doing this
was to set `moduleId: module.id`. This relied on the bundler to fill in a
value for `module.id`.

However, due to the superficial similarity between `Component.moduleId` and
`NgModule.id`, many users ended up setting `id: module.id` in their
NgModules. This is an anti-pattern that has a few negative effects,
including preventing the NgModule from tree-shaking properly.

This commit changes the compiler to ignore `id: module.id` in NgModules, and
instead provide a warning which suggests removing the line entirely.

PR Close #45024
2022-03-22 11:11:54 -07:00

2.8 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_IMPORT_NOT_STANDALONE = 2011,
    COMPONENT_INVALID_SHADOW_DOM_SELECTOR = 2009,
    // (undocumented)
    COMPONENT_MISSING_TEMPLATE = 2001,
    COMPONENT_NOT_STANDALONE = 2010,
    COMPONENT_RESOURCE_NOT_FOUND = 2008,
    COMPONENT_UNKNOWN_IMPORT = 2012,
    // (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_IS_STANDALONE = 6008,
    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,
    WARN_NGMODULE_ID_UNNECESSARY = 6100,
    WRITE_TO_READ_ONLY_VARIABLE = 8005
}

// (No @packageDocumentation comment for this package)