UNPKG

5.46 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.STACK_OVERFLOW = exports.CIRCULAR_DEPENDENCY_IN_FACTORY = exports.ON_DEACTIVATION_ERROR = exports.PRE_DESTROY_ERROR = exports.POST_CONSTRUCT_ERROR = exports.ASYNC_UNBIND_REQUIRED = exports.MULTIPLE_POST_CONSTRUCT_METHODS = exports.MULTIPLE_PRE_DESTROY_METHODS = exports.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK = exports.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE = exports.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE = exports.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT = exports.ARGUMENTS_LENGTH_MISMATCH = exports.INVALID_DECORATOR_OPERATION = exports.INVALID_TO_SELF_VALUE = exports.LAZY_IN_SYNC = exports.INVALID_FUNCTION_BINDING = exports.INVALID_MIDDLEWARE_RETURN = exports.NO_MORE_SNAPSHOTS_AVAILABLE = exports.INVALID_BINDING_TYPE = exports.NOT_IMPLEMENTED = exports.CIRCULAR_DEPENDENCY = exports.UNDEFINED_INJECT_ANNOTATION = exports.MISSING_INJECT_ANNOTATION = exports.MISSING_INJECTABLE_ANNOTATION = exports.NOT_REGISTERED = exports.CANNOT_UNBIND = exports.AMBIGUOUS_MATCH = exports.KEY_NOT_FOUND = exports.NULL_ARGUMENT = exports.DUPLICATED_METADATA = exports.DUPLICATED_INJECTABLE_DECORATOR = void 0;
4exports.DUPLICATED_INJECTABLE_DECORATOR = "Cannot apply @injectable decorator multiple times.";
5exports.DUPLICATED_METADATA = "Metadata key was used more than once in a parameter:";
6exports.NULL_ARGUMENT = "NULL argument";
7exports.KEY_NOT_FOUND = "Key Not Found";
8exports.AMBIGUOUS_MATCH = "Ambiguous match found for serviceIdentifier:";
9exports.CANNOT_UNBIND = "Could not unbind serviceIdentifier:";
10exports.NOT_REGISTERED = "No matching bindings found for serviceIdentifier:";
11exports.MISSING_INJECTABLE_ANNOTATION = "Missing required @injectable annotation in:";
12exports.MISSING_INJECT_ANNOTATION = "Missing required @inject or @multiInject annotation in:";
13var UNDEFINED_INJECT_ANNOTATION = function (name) {
14 return "@inject called with undefined this could mean that the class " + name + " has " +
15 "a circular dependency problem. You can use a LazyServiceIdentifer to " +
16 "overcome this limitation.";
17};
18exports.UNDEFINED_INJECT_ANNOTATION = UNDEFINED_INJECT_ANNOTATION;
19exports.CIRCULAR_DEPENDENCY = "Circular dependency found:";
20exports.NOT_IMPLEMENTED = "Sorry, this feature is not fully implemented yet.";
21exports.INVALID_BINDING_TYPE = "Invalid binding type:";
22exports.NO_MORE_SNAPSHOTS_AVAILABLE = "No snapshot available to restore.";
23exports.INVALID_MIDDLEWARE_RETURN = "Invalid return type in middleware. Middleware must return!";
24exports.INVALID_FUNCTION_BINDING = "Value provided to function binding must be a function!";
25var LAZY_IN_SYNC = function (key) { return "You are attempting to construct '" + key + "' in a synchronous way\n but it has asynchronous dependencies."; };
26exports.LAZY_IN_SYNC = LAZY_IN_SYNC;
27exports.INVALID_TO_SELF_VALUE = "The toSelf function can only be applied when a constructor is " +
28 "used as service identifier";
29exports.INVALID_DECORATOR_OPERATION = "The @inject @multiInject @tagged and @named decorators " +
30 "must be applied to the parameters of a class constructor or a class property.";
31var ARGUMENTS_LENGTH_MISMATCH = function () {
32 var values = [];
33 for (var _i = 0; _i < arguments.length; _i++) {
34 values[_i] = arguments[_i];
35 }
36 return "The number of constructor arguments in the derived class " +
37 (values[0] + " must be >= than the number of constructor arguments of its base class.");
38};
39exports.ARGUMENTS_LENGTH_MISMATCH = ARGUMENTS_LENGTH_MISMATCH;
40exports.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT = "Invalid Container constructor argument. Container options " +
41 "must be an object.";
42exports.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE = "Invalid Container option. Default scope must " +
43 "be a string ('singleton' or 'transient').";
44exports.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE = "Invalid Container option. Auto bind injectable must " +
45 "be a boolean";
46exports.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK = "Invalid Container option. Skip base check must " +
47 "be a boolean";
48exports.MULTIPLE_PRE_DESTROY_METHODS = "Cannot apply @preDestroy decorator multiple times in the same class";
49exports.MULTIPLE_POST_CONSTRUCT_METHODS = "Cannot apply @postConstruct decorator multiple times in the same class";
50exports.ASYNC_UNBIND_REQUIRED = "Attempting to unbind dependency with asynchronous destruction (@preDestroy or onDeactivation)";
51var POST_CONSTRUCT_ERROR = function (clazz, errorMessage) { return "@postConstruct error in class " + clazz + ": " + errorMessage; };
52exports.POST_CONSTRUCT_ERROR = POST_CONSTRUCT_ERROR;
53var PRE_DESTROY_ERROR = function (clazz, errorMessage) { return "@preDestroy error in class " + clazz + ": " + errorMessage; };
54exports.PRE_DESTROY_ERROR = PRE_DESTROY_ERROR;
55var ON_DEACTIVATION_ERROR = function (clazz, errorMessage) { return "onDeactivation() error in class " + clazz + ": " + errorMessage; };
56exports.ON_DEACTIVATION_ERROR = ON_DEACTIVATION_ERROR;
57var CIRCULAR_DEPENDENCY_IN_FACTORY = function (factoryType, serviceIdentifier) {
58 return "It looks like there is a circular dependency in one of the '" + factoryType + "' bindings. Please investigate bindings with" +
59 ("service identifier '" + serviceIdentifier + "'.");
60};
61exports.CIRCULAR_DEPENDENCY_IN_FACTORY = CIRCULAR_DEPENDENCY_IN_FACTORY;
62exports.STACK_OVERFLOW = "Maximum call stack size exceeded";
63//# sourceMappingURL=error_msgs.js.map
\No newline at end of file