1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.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;
|
4 | exports.DUPLICATED_INJECTABLE_DECORATOR = 'Cannot apply @injectable decorator multiple times.';
|
5 | exports.DUPLICATED_METADATA = 'Metadata key was used more than once in a parameter:';
|
6 | exports.NULL_ARGUMENT = 'NULL argument';
|
7 | exports.KEY_NOT_FOUND = 'Key Not Found';
|
8 | exports.AMBIGUOUS_MATCH = 'Ambiguous match found for serviceIdentifier:';
|
9 | exports.CANNOT_UNBIND = 'Could not unbind serviceIdentifier:';
|
10 | exports.NOT_REGISTERED = 'No matching bindings found for serviceIdentifier:';
|
11 | exports.MISSING_INJECTABLE_ANNOTATION = 'Missing required @injectable annotation in:';
|
12 | exports.MISSING_INJECT_ANNOTATION = 'Missing required @inject or @multiInject annotation in:';
|
13 | var 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 LazyServiceIdentifier to ' +
|
16 | 'overcome this limitation.';
|
17 | };
|
18 | exports.UNDEFINED_INJECT_ANNOTATION = UNDEFINED_INJECT_ANNOTATION;
|
19 | exports.CIRCULAR_DEPENDENCY = 'Circular dependency found:';
|
20 | exports.NOT_IMPLEMENTED = 'Sorry, this feature is not fully implemented yet.';
|
21 | exports.INVALID_BINDING_TYPE = 'Invalid binding type:';
|
22 | exports.NO_MORE_SNAPSHOTS_AVAILABLE = 'No snapshot available to restore.';
|
23 | exports.INVALID_MIDDLEWARE_RETURN = 'Invalid return type in middleware. Middleware must return!';
|
24 | exports.INVALID_FUNCTION_BINDING = 'Value provided to function binding must be a function!';
|
25 | var LAZY_IN_SYNC = function (key) { return "You are attempting to construct '" + key + "' in a synchronous way\n but it has asynchronous dependencies."; };
|
26 | exports.LAZY_IN_SYNC = LAZY_IN_SYNC;
|
27 | exports.INVALID_TO_SELF_VALUE = 'The toSelf function can only be applied when a constructor is ' +
|
28 | 'used as service identifier';
|
29 | exports.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.';
|
31 | var 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 | };
|
39 | exports.ARGUMENTS_LENGTH_MISMATCH = ARGUMENTS_LENGTH_MISMATCH;
|
40 | exports.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT = 'Invalid Container constructor argument. Container options ' +
|
41 | 'must be an object.';
|
42 | exports.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE = 'Invalid Container option. Default scope must ' +
|
43 | 'be a string ("singleton" or "transient").';
|
44 | exports.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE = 'Invalid Container option. Auto bind injectable must ' +
|
45 | 'be a boolean';
|
46 | exports.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK = 'Invalid Container option. Skip base check must ' +
|
47 | 'be a boolean';
|
48 | exports.MULTIPLE_PRE_DESTROY_METHODS = 'Cannot apply @preDestroy decorator multiple times in the same class';
|
49 | exports.MULTIPLE_POST_CONSTRUCT_METHODS = 'Cannot apply @postConstruct decorator multiple times in the same class';
|
50 | exports.ASYNC_UNBIND_REQUIRED = 'Attempting to unbind dependency with asynchronous destruction (@preDestroy or onDeactivation)';
|
51 | var POST_CONSTRUCT_ERROR = function (clazz, errorMessage) { return "@postConstruct error in class " + clazz + ": " + errorMessage; };
|
52 | exports.POST_CONSTRUCT_ERROR = POST_CONSTRUCT_ERROR;
|
53 | var PRE_DESTROY_ERROR = function (clazz, errorMessage) { return "@preDestroy error in class " + clazz + ": " + errorMessage; };
|
54 | exports.PRE_DESTROY_ERROR = PRE_DESTROY_ERROR;
|
55 | var ON_DEACTIVATION_ERROR = function (clazz, errorMessage) { return "onDeactivation() error in class " + clazz + ": " + errorMessage; };
|
56 | exports.ON_DEACTIVATION_ERROR = ON_DEACTIVATION_ERROR;
|
57 | var 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 | };
|
61 | exports.CIRCULAR_DEPENDENCY_IN_FACTORY = CIRCULAR_DEPENDENCY_IN_FACTORY;
|
62 | exports.STACK_OVERFLOW = 'Maximum call stack size exceeded';
|