test: add the error code of ngc/ngtsc under api guard (#35067)
We should not change these error code without a good reason, so they should be guarded. PR Close #35067
This commit is contained in:
parent
69b52903f0
commit
a4cacb55eb
|
@ -65,3 +65,14 @@ ts_api_guardian_test(
|
|||
],
|
||||
golden = "angular/tools/public_api_guard/global_utils.d.ts",
|
||||
)
|
||||
|
||||
# explicit target because the d.ts file is nested in the core and not part of typical public d.ts api
|
||||
ts_api_guardian_test(
|
||||
name = "error_code_api",
|
||||
actual = "angular/packages/compiler-cli/src/ngtsc/diagnostics/src/code.d.ts",
|
||||
data = [
|
||||
":error_code.d.ts",
|
||||
"//packages/compiler-cli/src/ngtsc/diagnostics",
|
||||
],
|
||||
golden = "angular/tools/public_api_guard/error_code.d.ts",
|
||||
)
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
export declare enum ErrorCode {
|
||||
DECORATOR_ARG_NOT_LITERAL = 1001,
|
||||
DECORATOR_ARITY_WRONG = 1002,
|
||||
DECORATOR_NOT_CALLED = 1003,
|
||||
DECORATOR_ON_ANONYMOUS_CLASS = 1004,
|
||||
DECORATOR_UNEXPECTED = 1005,
|
||||
DECORATOR_COLLISION = 1006,
|
||||
VALUE_HAS_WRONG_TYPE = 1010,
|
||||
VALUE_NOT_LITERAL = 1011,
|
||||
COMPONENT_MISSING_TEMPLATE = 2001,
|
||||
PIPE_MISSING_NAME = 2002,
|
||||
PARAM_MISSING_TOKEN = 2003,
|
||||
DIRECTIVE_MISSING_SELECTOR = 2004,
|
||||
UNDECORATED_PROVIDER = 2005,
|
||||
DIRECTIVE_INHERITS_UNDECORATED_CTOR = 2006,
|
||||
SYMBOL_NOT_EXPORTED = 3001,
|
||||
SYMBOL_EXPORTED_UNDER_DIFFERENT_NAME = 3002,
|
||||
CONFIG_FLAT_MODULE_NO_INDEX = 4001,
|
||||
CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK = 4002,
|
||||
HOST_BINDING_PARSE_ERROR = 5001,
|
||||
NGMODULE_INVALID_DECLARATION = 6001,
|
||||
NGMODULE_INVALID_IMPORT = 6002,
|
||||
NGMODULE_INVALID_EXPORT = 6003,
|
||||
NGMODULE_INVALID_REEXPORT = 6004,
|
||||
NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC = 6005,
|
||||
NGMODULE_REEXPORT_NAME_COLLISION = 6006,
|
||||
NGMODULE_DECLARATION_NOT_UNIQUE = 6007,
|
||||
SCHEMA_INVALID_ELEMENT = 8001,
|
||||
SCHEMA_INVALID_ATTRIBUTE = 8002,
|
||||
MISSING_REFERENCE_TARGET = 8003,
|
||||
MISSING_PIPE = 8004,
|
||||
WRITE_TO_READ_ONLY_VARIABLE = 8005,
|
||||
INJECTABLE_DUPLICATE_PROV = 9001
|
||||
}
|
Loading…
Reference in New Issue