diff --git a/bower.json b/bower.json index b0d18ff..dcccfb1 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aurelia-dependency-injection", - "version": "1.6.0", + "version": "1.6.1", "description": "A lightweight, extensible dependency injection container for JavaScript.", "keywords": [ "aurelia", diff --git a/dist/amd/aurelia-dependency-injection.js.map b/dist/amd/aurelia-dependency-injection.js.map index 67b6ad9..25c6ada 100644 --- a/dist/amd/aurelia-dependency-injection.js.map +++ b/dist/amd/aurelia-dependency-injection.js.map @@ -1 +1 @@ -{"version":3,"file":"aurelia-dependency-injection.js","sources":["../../node_modules/tslib/tslib.es6.js","../../../src/injection.ts","../../../src/resolvers.ts","../../../src/container.ts","../../../src/invokers.ts","../../../src/registrations.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","import { metadata } from 'aurelia-metadata';\r\nimport { _emptyParameters } from './container';\r\nimport { Args, Impl, DependencyCtor } from './types';\r\n\r\n// tslint:disable-next-line:ban-types\r\nexport type Injectable = Function & { inject?: any[] | (() => any[]) };\r\n\r\nfunction isInjectable(potentialTarget: any): potentialTarget is Injectable {\r\n return !!potentialTarget;\r\n}\r\n\r\n/**\r\n * Decorator: Directs the TypeScript transpiler to write-out type metadata for\r\n * the decorated class.\r\n */\r\nexport function autoinject(\r\n potentialTarget?: TPotential\r\n): TPotential extends Injectable ? void : (target: Injectable) => void {\r\n const deco = (target: Injectable): void => {\r\n if (!target.hasOwnProperty('inject')) {\r\n target.inject = (\r\n (metadata.getOwn(metadata.paramTypes, target) as any[]) ||\r\n _emptyParameters\r\n ).slice();\r\n if (target.inject && target.inject.length > 0) {\r\n // TypeScript 3.0 metadata for \"...rest\" gives type \"Object\"\r\n // if last parameter is \"Object\", assume it's a ...rest and remove that\r\n // metadata.\r\n if (target.inject[target.inject.length - 1] === Object) {\r\n target.inject.splice(-1, 1);\r\n }\r\n }\r\n }\r\n };\r\n if (isInjectable(potentialTarget)) {\r\n return deco(potentialTarget) as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n }\r\n return deco as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n}\r\n/**\r\n * Decorator: Specifies the dependencies that should be injected by the DI Container into the decorated class/function.\r\n */\r\nexport function inject<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(...rest: TArgs[number][]): any {\r\n return (\r\n target: DependencyCtor & { inject: any },\r\n _key: any,\r\n descriptor: any) => {\r\n // handle when used as a constructor parameter decorator\r\n if (typeof descriptor === 'number') {\r\n autoinject(target);\r\n if (rest.length === 1) {\r\n target.inject[descriptor] = rest[0];\r\n }\r\n return;\r\n }\r\n // if it's true then we injecting rest into function and not Class constructor\r\n if (descriptor) {\r\n const fn = descriptor.value;\r\n fn.inject = rest;\r\n } else {\r\n target.inject = rest;\r\n }\r\n };\r\n}\r\n","import { protocol } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { autoinject } from './injection';\r\nimport type {\r\n PrimitiveOrDependencyCtor,\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n DependencyCtor,\r\n DependencyFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Indicates that the decorated class/object is a custom resolver.\r\n */\r\nexport const resolver: {\r\n decorates?: (key: any) => key is { get(container: Container, key: any): any };\r\n} & (() => any) = ((protocol as unknown) as { create(...args: any[]): any }).create(\r\n 'aurelia:resolver',\r\n (target): string | boolean => {\r\n if (!(typeof target.get === 'function')) {\r\n return 'Resolvers must implement: get(container: Container, key: any): any';\r\n }\r\n\r\n return true;\r\n }\r\n);\r\n\r\n/**\r\n * Used to allow functions/classes to specify custom dependency resolution logic.\r\n */\r\nexport interface Resolver {\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n get(container: Container, key: any): any;\r\n}\r\n\r\nexport enum Strategy {\r\n instance = 0,\r\n singleton = 1,\r\n transient = 2,\r\n function = 3,\r\n array = 4,\r\n alias = 5\r\n}\r\nexport type IStrategy = 1 | 2 | 3 | 4 | 5;\r\n\r\nexport type StrategyFunctor<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > = (\r\n container?: Container,\r\n ctor?: PrimitiveOrDependencyCtorOrFunctor,\r\n strategyResolver?: any\r\n ) => TImpl;\r\n\r\nexport interface StrategyState<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > {\r\n [Strategy.instance]: TImpl;\r\n [Strategy.singleton]: DependencyCtorOrFunctor;\r\n [Strategy.transient]: DependencyCtorOrFunctor;\r\n [Strategy.function]: StrategyFunctor;\r\n /**\r\n * For typings purposes, this is done as ({ get: StrategyFunctor } | TImpl)[]\r\n * But it should be understood, and used as [{ get: StrategyFunctor }, ...TImp[]]\r\n */\r\n [Strategy.array]: ({\r\n get: (\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor\r\n ) => TImpl\r\n } | TImpl)[];\r\n [Strategy.alias]: any;\r\n}\r\n\r\nfunction isStrategy<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TKey extends keyof StrategyState\r\n>(\r\n actual: Strategy,\r\n expected: TKey,\r\n state):\r\n state is StrategyState[TKey] {\r\n return actual === expected;\r\n}\r\n/**\r\n * Used to resolve instances, singletons, transients, aliases\r\n */\r\n@resolver()\r\nexport class StrategyResolver<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TStrategyKey extends keyof StrategyState> {\r\n\r\n public strategy: keyof StrategyState;\r\n public state: StrategyState[keyof StrategyState];\r\n\r\n /**\r\n * Creates an instance of the StrategyResolver class.\r\n * @param strategy The type of resolution strategy.\r\n * @param state The state associated with the resolution strategy.\r\n */\r\n constructor(strategy: TStrategyKey, state: StrategyState[TStrategyKey]) {\r\n this.strategy = strategy;\r\n this.state = state;\r\n }\r\n\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n public get(container: Container, key: PrimitiveOrDependencyCtor) {\r\n if (isStrategy(this.strategy, Strategy.instance, this.state)) {\r\n return this.state;\r\n }\r\n if (isStrategy(this.strategy, Strategy.singleton, this.state)) {\r\n const singleton = container.invoke(this.state);\r\n this.state = singleton;\r\n this.strategy = 0;\r\n return singleton;\r\n }\r\n if (isStrategy(this.strategy, Strategy.transient, this.state)) {\r\n return container.invoke(this.state);\r\n }\r\n if (isStrategy(this.strategy, Strategy.function, this.state)) {\r\n return this.state(container, key, this);\r\n }\r\n if (isStrategy(this.strategy, Strategy.array, this.state)) {\r\n return (this.state[0] as { get: StrategyFunctor }).get(container, key);\r\n }\r\n if (isStrategy(this.strategy, Strategy.alias, this.state)) {\r\n return container.get(this.state) as TImpl;\r\n }\r\n throw new Error('Invalid strategy: ' + this.strategy);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify lazy resolution logic.\r\n */\r\n@resolver()\r\nexport class Lazy = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'lazy';\r\n\r\n /**\r\n * Creates an instance of the Lazy class.\r\n * @param key The key to lazily resolve.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to lazily resolve the dependency into a lazy locator\r\n * function.\r\n * @param container The container to resolve from.\r\n * @return Returns a function which can be invoked at a later time to obtain\r\n * the actual dependency.\r\n */\r\n public get(container: Container): () => ImplOrAny {\r\n return () => container.get(this._key);\r\n }\r\n\r\n /**\r\n * Creates a Lazy Resolver for the supplied key.\r\n * @param key The key to lazily resolve.\r\n * @return Returns an instance of Lazy for the key.\r\n */\r\n public static of<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ) {\r\n return new Lazy(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify resolution of all matches to a key.\r\n */\r\n@resolver()\r\nexport class All = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'all';\r\n\r\n /**\r\n * Creates an instance of the All class.\r\n * @param key The key to lazily resolve all matches for.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to resolve all matching dependencies as an array of\r\n * instances.\r\n * @param container The container to resolve from.\r\n * @return Returns an array of all matching instances.\r\n */\r\n public get(container: Container): TImpl[] {\r\n return container.getAll(this._key);\r\n }\r\n\r\n /**\r\n * Creates an All Resolver for the supplied key.\r\n * @param key The key to resolve all instances for.\r\n * @return Returns an instance of All for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): All {\r\n return new All(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify an optional dependency, which will\r\n * be resolved only if already registred with the container.\r\n */\r\n@resolver()\r\nexport class Optional = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /** @internal */\r\n public _checkParent: boolean;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'optional';\r\n\r\n /**\r\n * Creates an instance of the Optional class.\r\n * @param key The key to optionally resolve for.\r\n * @param checkParent Indicates whether or not the parent container hierarchy\r\n * should be checked.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor, checkParent: boolean = true) {\r\n this._key = key;\r\n this._checkParent = checkParent;\r\n }\r\n\r\n /**\r\n * Called by the container to provide optional resolution of the key.\r\n * @param container The container to resolve from.\r\n * @return Returns the instance if found; otherwise null.\r\n */\r\n public get(container: Container): TImpl | null {\r\n if (container.hasResolver(this._key, this._checkParent)) {\r\n return container.get(this._key);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Creates an Optional Resolver for the supplied key.\r\n * @param key The key to optionally resolve for.\r\n * @param [checkParent=true] Indicates whether or not the parent container\r\n * hierarchy should be checked.\r\n * @return Returns an instance of Optional for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n checkParent: boolean = true): Optional {\r\n return new Optional(key, checkParent);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject the dependency from the parent container instead of the current\r\n * one.\r\n */\r\n@resolver()\r\nexport class Parent = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'parent';\r\n\r\n /**\r\n * Creates an instance of the Parent class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to load the dependency from the parent container\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container): TImpl | null {\r\n return container.parent ? container.parent.get(this._key) : null;\r\n }\r\n\r\n /**\r\n * Creates a Parent Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Parent for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): Parent {\r\n return new Parent(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow injecting dependencies but also passing data to the constructor.\r\n */\r\n@resolver()\r\nexport class Factory = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtorOrFunctor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'factory';\r\n\r\n /**\r\n * Creates an instance of the Factory class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to pass the dependencies to the constructor.\r\n * @param container The container to invoke the constructor with dependencies\r\n * and other parameters.\r\n * @return Returns a function that can be invoked to resolve dependencies\r\n * later, and the rest of the parameters.\r\n */\r\n public get(container: Container): DependencyFunctor {\r\n let fn = this._key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === Strategy.function) {\r\n fn = resolver.state;\r\n }\r\n\r\n return (...rest) => container.invoke(fn as DependencyCtorOrFunctor, rest);\r\n }\r\n\r\n /**\r\n * Creates a Factory Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Factory for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: DependencyCtor\r\n ): Factory {\r\n return new Factory(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject a new instance of a dependency, without regard for existing\r\n * instances in the container. Instances can optionally be registered in the\r\n * container\r\n * under a different key by supplying a key using the `as` method.\r\n */\r\n@resolver()\r\nexport class NewInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public key: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public asKey: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public dynamicDependencies: TArgs[number][];\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'newInstance';\r\n\r\n /**\r\n * Creates an instance of the NewInstance class.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor, ...dynamicDependencies: TArgs[number][]) {\r\n this.key = key;\r\n this.asKey = key;\r\n this.dynamicDependencies = dynamicDependencies;\r\n }\r\n\r\n /**\r\n * Called by the container to instantiate the dependency and potentially\r\n * register\r\n * as another key if the `as` method was used.\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container) {\r\n const dynamicDependencies =\r\n this.dynamicDependencies.length > 0\r\n ? this.dynamicDependencies.map(dependency =>\r\n dependency['protocol:aurelia:resolver']\r\n ? dependency.get(container)\r\n : container.get(dependency)\r\n )\r\n : undefined;\r\n\r\n let fn = this.key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === 3) {\r\n fn = resolver.state;\r\n }\r\n\r\n const instance = container.invoke(fn as DependencyCtorOrFunctor, dynamicDependencies);\r\n container.registerInstance(this.asKey, instance);\r\n return instance;\r\n }\r\n\r\n /**\r\n * Instructs the NewInstance resolver to register the resolved instance using\r\n * the supplied key.\r\n * @param key The key to register the instance with.\r\n * @return Returns the NewInstance resolver.\r\n */\r\n public as(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this.asKey = key;\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates an NewInstance Resolver for the supplied key.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n * @return Returns an instance of NewInstance for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtorOrFunctor,\r\n ...dynamicDependencies: TArgs[number][]): NewInstance {\r\n return new NewInstance(key, ...dynamicDependencies);\r\n }\r\n}\r\n\r\n/**\r\n * Used by parameter decorators to call autoinject for the target and retrieve\r\n * the target's inject property.\r\n * @param target The target class.\r\n * @return Returns the target's own inject property.\r\n */\r\nexport function getDecoratorDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] }\r\n ) {\r\n autoinject(target);\r\n\r\n return target.inject;\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should be lazy loaded\r\n */\r\nexport function lazy<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: { new (...args: TArgs): TBase | TImpl },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Lazy.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should load all instances of the given\r\n * key.\r\n */\r\nexport function all<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = All.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as optional\r\n */\r\nexport function optional<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n checkParentOrTarget: boolean = true) {\r\n const deco = (checkParent: boolean) => {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Optional.of(inject[index], checkParent);\r\n };\r\n };\r\n if (typeof checkParentOrTarget === 'boolean') {\r\n return deco(checkParentOrTarget);\r\n }\r\n return deco(true);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to look at the parent container for\r\n * resolution\r\n */\r\nexport function parent<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Parent.of(inject[index]);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to create a factory method, that can\r\n * accept optional arguments\r\n */\r\nexport function factory<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Factory.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as a new instance. Instances can optionally be registered in the container\r\n * under a different key and/or use dynamic dependencies\r\n */\r\nexport function newInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n asKeyOrTarget?: PrimitiveOrDependencyCtor & { inject?: TArgs[number][] },\r\n ...dynamicDependencies: TArgs[number][]\r\n) {\r\n const deco = (asKey?: typeof asKeyOrTarget) => {\r\n return (\r\n target: { new (...args: any[]): any },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = NewInstance.of(inject[index], ...dynamicDependencies);\r\n if (!!asKey) {\r\n inject[index].as(asKey);\r\n }\r\n };\r\n };\r\n if (arguments.length >= 1) {\r\n return deco(asKeyOrTarget);\r\n }\r\n return deco();\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { AggregateError } from 'aurelia-pal';\r\nimport { resolver, StrategyResolver, Resolver, Strategy, StrategyState, Factory, NewInstance, Lazy, Optional, All, Parent } from './resolvers';\r\nimport { Invoker } from './invokers';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n DependencyCtor,\r\n PrimitiveOrDependencyCtor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args,\r\n Primitive\r\n} from './types';\r\n\r\nlet currentContainer: Container | null = null;\r\n\r\nfunction validateKey(key: any) {\r\n if (key === null || key === undefined) {\r\n throw new Error(\r\n 'key/value cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport const _emptyParameters = Object.freeze([]) as [];\r\n\r\nmetadata.registration = 'aurelia:registration';\r\nmetadata.invoker = 'aurelia:invoker';\r\n\r\nconst resolverDecorates = resolver.decorates!;\r\n\r\n/**\r\n * Stores the information needed to invoke a function.\r\n */\r\nexport class InvocationHandler<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args\r\n > {\r\n /**\r\n * The function to be invoked by this handler.\r\n */\r\n public fn: DependencyCtorOrFunctor;\r\n\r\n /**\r\n * The invoker implementation that will be used to actually invoke the function.\r\n */\r\n public invoker: Invoker;\r\n\r\n /**\r\n * The statically known dependencies of this function invocation.\r\n */\r\n public dependencies: TArgs;\r\n\r\n /**\r\n * Instantiates an InvocationDescription.\r\n * @param fn The Function described by this description object.\r\n * @param invoker The strategy for invoking the function.\r\n * @param dependencies The static dependencies of the function call.\r\n */\r\n constructor(\r\n fn: DependencyCtorOrFunctor,\r\n invoker: Invoker,\r\n dependencies: TArgs\r\n ) {\r\n this.fn = fn;\r\n this.invoker = invoker;\r\n this.dependencies = dependencies;\r\n }\r\n\r\n /**\r\n * Invokes the function.\r\n * @param container The calling container.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(container: Container, dynamicDependencies?: TArgs[]): TImpl {\r\n const previousContainer = currentContainer;\r\n currentContainer = container;\r\n try {\r\n return dynamicDependencies !== undefined\r\n ? this.invoker.invokeWithDynamicDependencies(\r\n container,\r\n this.fn,\r\n this.dependencies,\r\n dynamicDependencies\r\n )\r\n : this.invoker.invoke(container, this.fn, this.dependencies);\r\n } finally {\r\n currentContainer = previousContainer;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Used to configure a Container instance.\r\n */\r\nexport interface ContainerConfiguration {\r\n /**\r\n * An optional callback which will be called when any function needs an\r\n * InvocationHandler created (called once per Function).\r\n */\r\n onHandlerCreated?: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n handlers?: Map;\r\n}\r\n\r\nfunction invokeWithDynamicDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n) {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n let lookup;\r\n\r\n while (i--) {\r\n lookup = staticDependencies[i];\r\n\r\n if (lookup === null || lookup === undefined) {\r\n throw new Error(\r\n 'Constructor Parameter with index ' +\r\n i +\r\n ' cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n } else {\r\n args[i] = container.get(lookup);\r\n }\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return Reflect.construct(fn, args);\r\n}\r\n\r\nconst classInvoker: Invoker = {\r\n invoke(container, Type: DependencyCtor, deps) {\r\n const instances = deps.map((dep) => container.get(dep));\r\n return Reflect.construct(Type, instances);\r\n },\r\n invokeWithDynamicDependencies\r\n};\r\n\r\nfunction getDependencies(f) {\r\n if (!f.hasOwnProperty('inject')) {\r\n return [];\r\n }\r\n\r\n if (typeof f.inject === 'function') {\r\n return f.inject();\r\n }\r\n\r\n return f.inject;\r\n}\r\n\r\n/**\r\n * A lightweight, extensible dependency injection container.\r\n */\r\nexport class Container {\r\n /**\r\n * The global root Container instance. Available if makeGlobal() has been\r\n * called. Aurelia Framework calls makeGlobal().\r\n */\r\n public static instance: Container;\r\n\r\n /**\r\n * The parent container in the DI hierarchy.\r\n */\r\n public parent: Container | null;\r\n\r\n /**\r\n * The root container in the DI hierarchy.\r\n */\r\n public root: Container;\r\n\r\n /** @internal */\r\n public _configuration: ContainerConfiguration;\r\n\r\n /** @internal */\r\n public _onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n /** @internal */\r\n public _handlers: Map;\r\n\r\n /** @internal */\r\n public _resolvers: Map;\r\n\r\n /**\r\n * Creates an instance of Container.\r\n * @param configuration Provides some configuration for the new Container instance.\r\n */\r\n constructor(configuration?: ContainerConfiguration) {\r\n if (configuration === undefined) {\r\n configuration = {};\r\n }\r\n\r\n this._configuration = configuration;\r\n this._onHandlerCreated = configuration.onHandlerCreated!;\r\n this._handlers =\r\n configuration.handlers || (configuration.handlers = new Map());\r\n this._resolvers = new Map();\r\n this.root = this;\r\n this.parent = null;\r\n }\r\n\r\n /**\r\n * Makes this container instance globally reachable through Container.instance.\r\n */\r\n public makeGlobal(): Container {\r\n Container.instance = this;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets an invocation handler creation callback that will be called when new\r\n * InvocationsHandlers are created (called once per Function).\r\n * @param onHandlerCreated The callback to be called when an\r\n * InvocationsHandler is created.\r\n */\r\n public setHandlerCreatedCallback<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler\r\n ) {\r\n this._onHandlerCreated = onHandlerCreated;\r\n this._configuration.onHandlerCreated = onHandlerCreated;\r\n }\r\n\r\n /**\r\n * Registers an existing object instance with the container.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param instance The instance that will be resolved when the key is matched.\r\n * This defaults to the key value when instance is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerInstance = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n instance?: TImpl): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(0, instance === undefined ? key : instance)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container always\r\n * returns the same instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.singleton, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container returns a\r\n * new instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(2, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param handler The resolution function to use when the dependency is\r\n * needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerHandler = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n handler: (container?: Container, key?: PrimitiveOrDependencyCtor, resolver?: Resolver) => any\r\n ): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.function, handler)\r\n );\r\n }\r\n\r\n /**\r\n * Registers an additional key that serves as an alias to the original DI key.\r\n * @param originalKey The key that originally identified the dependency; usually a constructor function.\r\n * @param aliasKey An alternate key which can also be used to resolve the same dependency as the original.\r\n * @return The resolver that was registered.\r\n */\r\n public registerAlias = Impl, TArgs extends Args = Args>(\r\n originalKey: PrimitiveOrDependencyCtor,\r\n aliasKey: PrimitiveOrDependencyCtor): Resolver {\r\n return this.registerResolver(\r\n aliasKey,\r\n new StrategyResolver(5, originalKey)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param resolver The resolver to use when the dependency is needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n resolver: Resolver\r\n ): Resolver {\r\n validateKey(key);\r\n\r\n const allResolvers = this._resolvers;\r\n const result = allResolvers.get(key);\r\n\r\n if (result === undefined) {\r\n allResolvers.set(key, resolver);\r\n } else if (result.strategy === 4) {\r\n result.state.push(resolver);\r\n } else {\r\n allResolvers.set(key, new StrategyResolver(4, [result, resolver]));\r\n }\r\n\r\n return resolver;\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) by inspecting its registration\r\n * annotations. If none are found, then the default singleton registration is\r\n * used.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n */\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n fn = fn === undefined ? key as DependencyCtor : fn;\r\n\r\n if (typeof fn === 'function') {\r\n const registration = metadata.get(metadata.registration, fn);\r\n\r\n if (registration === undefined) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn));\r\n }\r\n\r\n return registration.registerResolver(this, key, fn);\r\n }\r\n\r\n return this.registerResolver(key, new StrategyResolver(0, fn));\r\n }\r\n\r\n /**\r\n * Registers an array of types (constructor functions) by inspecting their\r\n * registration annotations. If none are found, then the default singleton\r\n * registration is used.\r\n * @param fns The constructor function to use when the dependency needs to be instantiated.\r\n */\r\n public autoRegisterAll(fns: DependencyCtor[]): void {\r\n let i = fns.length;\r\n while (i--) {\r\n this.autoRegister(fns[i]);\r\n }\r\n }\r\n\r\n /**\r\n * Unregisters based on key.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n */\r\n public unregister(key: any): void {\r\n this._resolvers.delete(key);\r\n }\r\n\r\n /**\r\n * Inspects the container to determine if a particular key has been registred.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @param checkParent Indicates whether or not to check the parent container hierarchy.\r\n * @return Returns true if the key has been registred; false otherwise.\r\n */\r\n public hasResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, checkParent: boolean = false): boolean {\r\n validateKey(key);\r\n\r\n return (\r\n this._resolvers.has(key) ||\r\n (checkParent &&\r\n this.parent !== null &&\r\n this.parent.hasResolver(key, checkParent))\r\n );\r\n }\r\n\r\n /**\r\n * Gets the resolver for the particular key, if it has been registered.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @return Returns the resolver, if registred, otherwise undefined.\r\n */\r\n public getResolver<\r\n TStrategyKey extends keyof StrategyState,\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n >(\r\n key: PrimitiveOrDependencyCtorOrFunctor\r\n ): StrategyResolver {\r\n return this._resolvers.get(key);\r\n }\r\n\r\n /**\r\n * Resolves a single instance based on the provided key.\r\n * @param key The key that identifies the object to resolve.\r\n * @return Returns the resolved instance.\r\n */\r\n public get | Lazy | Factory | Optional | Parent | All>(\r\n key: TResolver): ResolvedValue;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: typeof Container): Container;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor | typeof Container): ImplOrAny | Container {\r\n validateKey(key);\r\n\r\n if (key === Container) {\r\n return this;\r\n }\r\n\r\n if (resolverDecorates(key)) {\r\n return key.get(this, key);\r\n }\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key as DependencyCtor).get(this, key);\r\n }\r\n\r\n const registration = metadata.get(metadata.registration, key);\r\n\r\n if (registration === undefined) {\r\n return this.parent._get(key);\r\n }\r\n\r\n return registration.registerResolver(\r\n this, key, key as DependencyCtorOrFunctor).get(this, key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n public _get(key) {\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n\r\n return this.parent._get(key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n /**\r\n * Resolves all instance registered under the provided key.\r\n * @param key The key that identifies the objects to resolve.\r\n * @return Returns an array of the resolved instances.\r\n */\r\n public getAll = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny[] {\r\n validateKey(key);\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return _emptyParameters;\r\n }\r\n\r\n return this.parent.getAll(key);\r\n }\r\n\r\n if (resolver.strategy === 4) {\r\n const state = resolver.state;\r\n let i = state.length;\r\n const results = new Array(i);\r\n\r\n while (i--) {\r\n results[i] = state[i].get(this, key);\r\n }\r\n\r\n return results;\r\n }\r\n\r\n return [resolver.get(this, key)];\r\n }\r\n\r\n /**\r\n * Creates a new dependency injection container whose parent is the current container.\r\n * @return Returns a new container instance parented to this.\r\n */\r\n public createChild(): Container {\r\n const child = new Container(this._configuration);\r\n child.root = this.root;\r\n child.parent = this;\r\n return child;\r\n }\r\n\r\n /**\r\n * Invokes a function, recursively resolving its dependencies.\r\n * @param fn The function to invoke with the auto-resolved dependencies.\r\n * @param dynamicDependencies Additional function dependencies to use during invocation.\r\n * @return Returns the instance resulting from calling the function.\r\n */\r\n public invoke = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor,\r\n dynamicDependencies?: TArgs[number][]\r\n ): ImplOrAny {\r\n try {\r\n let handler = this._handlers.get(fn);\r\n\r\n if (handler === undefined) {\r\n handler = this._createInvocationHandler(fn);\r\n this._handlers.set(fn, handler);\r\n }\r\n\r\n return handler.invoke(this, dynamicDependencies);\r\n } catch (e) {\r\n // @ts-expect-error AggregateError returns an Error in its type hence it fails (new ...) but it's fine\r\n throw new AggregateError(\r\n `Error invoking ${fn.name}. Check the inner error for details.`,\r\n e as Error | undefined,\r\n true\r\n );\r\n }\r\n }\r\n\r\n public _createInvocationHandler\r\n = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor & { inject?: any; }\r\n ): InvocationHandler {\r\n let dependencies;\r\n\r\n if (fn.inject === undefined) {\r\n dependencies =\r\n metadata.getOwn(metadata.paramTypes, fn) || _emptyParameters;\r\n } else {\r\n dependencies = [];\r\n let ctor = fn;\r\n while (typeof ctor === 'function') {\r\n dependencies.push(...getDependencies(ctor));\r\n ctor = Object.getPrototypeOf(ctor);\r\n }\r\n }\r\n\r\n const invoker = metadata.getOwn(metadata.invoker, fn) || classInvoker;\r\n\r\n const handler = new InvocationHandler(fn, invoker, dependencies);\r\n return this._onHandlerCreated !== undefined\r\n ? this._onHandlerCreated(handler)\r\n : handler;\r\n }\r\n}\r\n\r\nexport type ResolvedValue =\r\n T extends { new (...args: any[]): infer R }\r\n ? R\r\n : T extends Factory\r\n ? (...args: unknown[]) => R\r\n : T extends Lazy\r\n ? () => R\r\n : T extends NewInstance\r\n ? R\r\n : T extends Optional\r\n ? R | null\r\n : T extends All\r\n ? R[]\r\n : T extends Parent\r\n ? R | null\r\n : T extends [infer T1, ...infer T2]\r\n ? [ResolvedValue, ...ResolvedValue]\r\n : T;\r\n\r\n/**\r\n * Resolve a key, or list of keys based on the current container.\r\n * \r\n * @example\r\n * ```ts\r\n * import { resolve } from 'aurelia-framework';\r\n * // or\r\n * // import { Container, resolve } from 'aurelia-dependency-injection';\r\n * \r\n * class MyCustomElement {\r\n * someService = resolve(MyService);\r\n * }\r\n * ```\r\n */\r\nexport function resolve(key: K): ResolvedValue;\r\nexport function resolve(...keys: K): ResolvedValue\r\nexport function resolve(...keys: K) {\r\n if (currentContainer == null) {\r\n throw new Error(`There is not a currently active container to resolve \"${String(keys)}\". Are you trying to \"new SomeClass(...)\" that has a resolve(...) call?`);\r\n }\r\n \r\n return keys.length === 1\r\n ? currentContainer.get(keys[0])\r\n : keys.map(containerGetKey, currentContainer);\r\n}\r\n\r\nfunction containerGetKey(this: Container, key: any) {\r\n return this.get(key);\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { DependencyCtorOrFunctor, ImplOrAny, Impl, Args, DependencyCtor, DependencyFunctor } from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom Invoker for the decorated item.\r\n */\r\nexport function invoker, TArgs extends Args>(\r\n value: Invoker\r\n): (target: DependencyCtor) => void {\r\n return target => {\r\n metadata.define(metadata.invoker, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies that the decorated item should be called as a factory\r\n * function, rather than a constructor.\r\n */\r\nexport function invokeAsFactory, TArgs extends Args>(\r\n potentialTarget?: DependencyCtor\r\n): void | ((target: DependencyCtor) => void) {\r\n const deco = (target: DependencyCtor) => {\r\n metadata.define(metadata.invoker, FactoryInvoker.instance, target);\r\n };\r\n\r\n return potentialTarget ? deco(potentialTarget) : deco;\r\n}\r\n\r\n/**\r\n * A strategy for invoking a function, resulting in an object instance.\r\n */\r\nexport interface Invoker, TArgs extends Args> {\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during\r\n * invocation.\r\n * @return The result of the function invocation.\r\n */\r\n invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny;\r\n}\r\n\r\n/**\r\n * An Invoker that is used to invoke a factory method.\r\n */\r\nexport class FactoryInvoker<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > implements Invoker {\r\n /**\r\n * The singleton instance of the FactoryInvoker.\r\n */\r\n public static instance: FactoryInvoker;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny {\r\n let i = dependencies.length;\r\n const args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(dependencies[i]);\r\n }\r\n\r\n return ((fn as DependencyFunctor).apply(undefined, args as TArgs)) as ImplOrAny;\r\n }\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(staticDependencies[i]);\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return (fn as DependencyFunctor).apply(undefined, args as TArgs) as ImplOrAny;\r\n }\r\n}\r\n\r\nFactoryInvoker.instance = new FactoryInvoker();\r\n","import './internal';\r\nimport { Resolver } from './resolvers';\r\nimport { Container } from './container';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtor,\r\n Impl,\r\n Args,\r\n DependencyCtor\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom registration strategy for the decorated\r\n * class/function.\r\n */\r\nexport function registration, TArgs extends Args>(\r\n value: Registration) {\r\n return (target: DependencyCtor) => {\r\n metadata.define(metadata.registration, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"transient\"\r\n * lifetime.\r\n */\r\nexport function transient, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor) {\r\n return registration(new TransientRegistration(key));\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"singleton\"\r\n * lifetime.\r\n */\r\nexport function singleton(registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor, registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean, registerInChild: boolean = false) {\r\n return registration(\r\n new SingletonRegistration(keyOrRegisterInChild, registerInChild)\r\n );\r\n}\r\n\r\n/**\r\n * Customizes how a particular function is resolved by the Container.\r\n */\r\nexport interface Registration<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args> {\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver;\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * transients with the container.\r\n */\r\nexport class TransientRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of TransientRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(key?: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const existingResolver = container.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? container.registerTransient(\r\n (this._key || key) as string,\r\n fn as DependencyCtorOrFunctor)\r\n : existingResolver;\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * singletons with the container.\r\n */\r\nexport class SingletonRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _registerInChild: boolean;\r\n\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of SingletonRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean,\r\n registerInChild: boolean = false) {\r\n if (typeof keyOrRegisterInChild === 'boolean') {\r\n this._registerInChild = keyOrRegisterInChild;\r\n } else {\r\n this._key = keyOrRegisterInChild;\r\n this._registerInChild = registerInChild;\r\n }\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const targetContainer = this._registerInChild ? container : container.root;\r\n const existingResolver = targetContainer.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? targetContainer.registerSingleton(this._key || key, fn)\r\n : existingResolver;\r\n }\r\n}\r\n"],"names":["metadata","protocol","Strategy","AggregateError"],"mappings":";;IAAA;IACA;AACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AACA;AAsCA;IACO,SAAS,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;IAC1D,IAAI,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,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BAAA,IAAA,YAAA;QAYE,SACE,qBAAA,CAAA,oBAA+E,EAC/E,eAAgC,EAAA;IAAhC,QAAA,IAAA,eAAA,KAAA,KAAA,CAAA,EAAA,EAAA,eAAgC,GAAA,KAAA,CAAA,EAAA;IAChC,QAAA,IAAI,OAAO,oBAAoB,KAAK,SAAS,EAAE;IAC7C,YAAA,IAAI,CAAC,gBAAgB,GAAG,oBAAoB,CAAC;aAC9C;iBAAM;IACL,YAAA,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;IACjC,YAAA,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;aACzC;SACF;IASM,IAAA,qBAAA,CAAA,SAAA,CAAA,gBAAgB,GAAvB,UACE,SAAoB,EACpB,GAAmD,EACnD,EAAgD,EAAA;IAEhD,QAAA,IAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC;IAC3E,QAAA,IAAM,gBAAgB,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC;YACvE,OAAO,gBAAgB,KAAK,SAAS;IACnC,cAAE,eAAe,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,EAAE,EAAE,CAAC;kBACvD,gBAAgB,CAAC;SACtB,CAAA;QACH,OAAC,qBAAA,CAAA;IAAD,CAAC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]} \ No newline at end of file +{"version":3,"file":"aurelia-dependency-injection.js","sources":["../../node_modules/tslib/tslib.es6.js","../../../src/injection.ts","../../../src/resolvers.ts","../../../src/container.ts","../../../src/invokers.ts","../../../src/registrations.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","import { metadata } from 'aurelia-metadata';\r\nimport { _emptyParameters } from './container';\r\nimport { Args, Impl, DependencyCtor } from './types';\r\n\r\n// tslint:disable-next-line:ban-types\r\nexport type Injectable = Function & { inject?: any[] | (() => any[]) };\r\n\r\nfunction isInjectable(potentialTarget: any): potentialTarget is Injectable {\r\n return !!potentialTarget;\r\n}\r\n\r\n/**\r\n * Decorator: Directs the TypeScript transpiler to write-out type metadata for\r\n * the decorated class.\r\n */\r\nexport function autoinject(\r\n potentialTarget?: TPotential\r\n): TPotential extends Injectable ? void : (target: Injectable) => void {\r\n const deco = (target: Injectable): void => {\r\n if (!target.hasOwnProperty('inject')) {\r\n target.inject = (\r\n (metadata.getOwn(metadata.paramTypes, target) as any[]) ||\r\n _emptyParameters\r\n ).slice();\r\n if (target.inject && target.inject.length > 0) {\r\n // TypeScript 3.0 metadata for \"...rest\" gives type \"Object\"\r\n // if last parameter is \"Object\", assume it's a ...rest and remove that\r\n // metadata.\r\n if (target.inject[target.inject.length - 1] === Object) {\r\n target.inject.splice(-1, 1);\r\n }\r\n }\r\n }\r\n };\r\n if (isInjectable(potentialTarget)) {\r\n return deco(potentialTarget) as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n }\r\n return deco as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n}\r\n/**\r\n * Decorator: Specifies the dependencies that should be injected by the DI Container into the decorated class/function.\r\n */\r\nexport function inject<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(...rest: TArgs[number][]): any {\r\n return (\r\n target: DependencyCtor & { inject: any },\r\n _key: any,\r\n descriptor: any) => {\r\n // handle when used as a constructor parameter decorator\r\n if (typeof descriptor === 'number') {\r\n autoinject(target);\r\n if (rest.length === 1) {\r\n target.inject[descriptor] = rest[0];\r\n }\r\n return;\r\n }\r\n // if it's true then we injecting rest into function and not Class constructor\r\n if (descriptor) {\r\n const fn = descriptor.value;\r\n fn.inject = rest;\r\n } else {\r\n target.inject = rest;\r\n }\r\n };\r\n}\r\n","import { protocol } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { autoinject } from './injection';\r\nimport type {\r\n PrimitiveOrDependencyCtor,\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n DependencyCtor,\r\n DependencyFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Indicates that the decorated class/object is a custom resolver.\r\n */\r\nexport const resolver: {\r\n decorates?: (key: any) => key is { get(container: Container, key: any): any };\r\n} & (() => any) = ((protocol as unknown) as { create(...args: any[]): any }).create(\r\n 'aurelia:resolver',\r\n (target): string | boolean => {\r\n if (!(typeof target.get === 'function')) {\r\n return 'Resolvers must implement: get(container: Container, key: any): any';\r\n }\r\n\r\n return true;\r\n }\r\n);\r\n\r\n/**\r\n * Used to allow functions/classes to specify custom dependency resolution logic.\r\n */\r\nexport interface Resolver {\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n get(container: Container, key: any): any;\r\n}\r\n\r\nexport enum Strategy {\r\n instance = 0,\r\n singleton = 1,\r\n transient = 2,\r\n function = 3,\r\n array = 4,\r\n alias = 5\r\n}\r\nexport type IStrategy = 1 | 2 | 3 | 4 | 5;\r\n\r\nexport type StrategyFunctor<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > = (\r\n container?: Container,\r\n ctor?: PrimitiveOrDependencyCtorOrFunctor,\r\n strategyResolver?: any\r\n ) => TImpl;\r\n\r\nexport interface StrategyState<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > {\r\n [Strategy.instance]: TImpl;\r\n [Strategy.singleton]: DependencyCtorOrFunctor;\r\n [Strategy.transient]: DependencyCtorOrFunctor;\r\n [Strategy.function]: StrategyFunctor;\r\n /**\r\n * For typings purposes, this is done as ({ get: StrategyFunctor } | TImpl)[]\r\n * But it should be understood, and used as [{ get: StrategyFunctor }, ...TImp[]]\r\n */\r\n [Strategy.array]: ({\r\n get: (\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor\r\n ) => TImpl\r\n } | TImpl)[];\r\n [Strategy.alias]: any;\r\n}\r\n\r\nfunction isStrategy<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TKey extends keyof StrategyState\r\n>(\r\n actual: Strategy,\r\n expected: TKey,\r\n state):\r\n state is StrategyState[TKey] {\r\n return actual === expected;\r\n}\r\n/**\r\n * Used to resolve instances, singletons, transients, aliases\r\n */\r\n@resolver()\r\nexport class StrategyResolver<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TStrategyKey extends keyof StrategyState> {\r\n\r\n public strategy: keyof StrategyState;\r\n public state: StrategyState[keyof StrategyState];\r\n\r\n /**\r\n * Creates an instance of the StrategyResolver class.\r\n * @param strategy The type of resolution strategy.\r\n * @param state The state associated with the resolution strategy.\r\n */\r\n constructor(strategy: TStrategyKey, state: StrategyState[TStrategyKey]) {\r\n this.strategy = strategy;\r\n this.state = state;\r\n }\r\n\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n public get(container: Container, key: PrimitiveOrDependencyCtor) {\r\n if (isStrategy(this.strategy, Strategy.instance, this.state)) {\r\n return this.state;\r\n }\r\n if (isStrategy(this.strategy, Strategy.singleton, this.state)) {\r\n const singleton = container.invoke(this.state);\r\n this.state = singleton;\r\n this.strategy = 0;\r\n return singleton;\r\n }\r\n if (isStrategy(this.strategy, Strategy.transient, this.state)) {\r\n return container.invoke(this.state);\r\n }\r\n if (isStrategy(this.strategy, Strategy.function, this.state)) {\r\n return this.state(container, key, this);\r\n }\r\n if (isStrategy(this.strategy, Strategy.array, this.state)) {\r\n return (this.state[0] as { get: StrategyFunctor }).get(container, key);\r\n }\r\n if (isStrategy(this.strategy, Strategy.alias, this.state)) {\r\n return container.get(this.state) as TImpl;\r\n }\r\n throw new Error('Invalid strategy: ' + this.strategy);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify lazy resolution logic.\r\n */\r\n@resolver()\r\nexport class Lazy = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'lazy';\r\n\r\n /**\r\n * Creates an instance of the Lazy class.\r\n * @param key The key to lazily resolve.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to lazily resolve the dependency into a lazy locator\r\n * function.\r\n * @param container The container to resolve from.\r\n * @return Returns a function which can be invoked at a later time to obtain\r\n * the actual dependency.\r\n */\r\n public get(container: Container): () => ImplOrAny {\r\n return () => container.get(this._key);\r\n }\r\n\r\n /**\r\n * Creates a Lazy Resolver for the supplied key.\r\n * @param key The key to lazily resolve.\r\n * @return Returns an instance of Lazy for the key.\r\n */\r\n public static of<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ) {\r\n return new Lazy(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify resolution of all matches to a key.\r\n */\r\n@resolver()\r\nexport class All = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'all';\r\n\r\n /**\r\n * Creates an instance of the All class.\r\n * @param key The key to lazily resolve all matches for.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to resolve all matching dependencies as an array of\r\n * instances.\r\n * @param container The container to resolve from.\r\n * @return Returns an array of all matching instances.\r\n */\r\n public get(container: Container): TImpl[] {\r\n return container.getAll(this._key);\r\n }\r\n\r\n /**\r\n * Creates an All Resolver for the supplied key.\r\n * @param key The key to resolve all instances for.\r\n * @return Returns an instance of All for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): All {\r\n return new All(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify an optional dependency, which will\r\n * be resolved only if already registred with the container.\r\n */\r\n@resolver()\r\nexport class Optional = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /** @internal */\r\n public _checkParent: boolean;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'optional';\r\n\r\n /**\r\n * Creates an instance of the Optional class.\r\n * @param key The key to optionally resolve for.\r\n * @param checkParent Indicates whether or not the parent container hierarchy\r\n * should be checked.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor, checkParent: boolean = true) {\r\n this._key = key;\r\n this._checkParent = checkParent;\r\n }\r\n\r\n /**\r\n * Called by the container to provide optional resolution of the key.\r\n * @param container The container to resolve from.\r\n * @return Returns the instance if found; otherwise null.\r\n */\r\n public get(container: Container): TImpl | null {\r\n if (container.hasResolver(this._key, this._checkParent)) {\r\n return container.get(this._key);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Creates an Optional Resolver for the supplied key.\r\n * @param key The key to optionally resolve for.\r\n * @param [checkParent=true] Indicates whether or not the parent container\r\n * hierarchy should be checked.\r\n * @return Returns an instance of Optional for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n checkParent: boolean = true): Optional {\r\n return new Optional(key, checkParent);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject the dependency from the parent container instead of the current\r\n * one.\r\n */\r\n@resolver()\r\nexport class Parent = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'parent';\r\n\r\n /**\r\n * Creates an instance of the Parent class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to load the dependency from the parent container\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container): TImpl | null {\r\n return container.parent ? container.parent.get(this._key) : null;\r\n }\r\n\r\n /**\r\n * Creates a Parent Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Parent for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): Parent {\r\n return new Parent(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow injecting dependencies but also passing data to the constructor.\r\n */\r\n@resolver()\r\nexport class Factory = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtorOrFunctor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'factory';\r\n\r\n /**\r\n * Creates an instance of the Factory class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to pass the dependencies to the constructor.\r\n * @param container The container to invoke the constructor with dependencies\r\n * and other parameters.\r\n * @return Returns a function that can be invoked to resolve dependencies\r\n * later, and the rest of the parameters.\r\n */\r\n public get(container: Container): DependencyFunctor {\r\n let fn = this._key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === Strategy.function) {\r\n fn = resolver.state;\r\n }\r\n\r\n return (...rest) => container.invoke(fn as DependencyCtorOrFunctor, rest);\r\n }\r\n\r\n /**\r\n * Creates a Factory Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Factory for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: DependencyCtor\r\n ): Factory {\r\n return new Factory(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject a new instance of a dependency, without regard for existing\r\n * instances in the container. Instances can optionally be registered in the\r\n * container\r\n * under a different key by supplying a key using the `as` method.\r\n */\r\n@resolver()\r\nexport class NewInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public key: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public asKey: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public dynamicDependencies: TArgs[number][];\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'newInstance';\r\n\r\n /**\r\n * Creates an instance of the NewInstance class.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor, ...dynamicDependencies: TArgs[number][]) {\r\n this.key = key;\r\n this.asKey = key;\r\n this.dynamicDependencies = dynamicDependencies;\r\n }\r\n\r\n /**\r\n * Called by the container to instantiate the dependency and potentially\r\n * register\r\n * as another key if the `as` method was used.\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container) {\r\n const dynamicDependencies =\r\n this.dynamicDependencies.length > 0\r\n ? this.dynamicDependencies.map(dependency =>\r\n dependency['protocol:aurelia:resolver']\r\n ? dependency.get(container)\r\n : container.get(dependency)\r\n )\r\n : undefined;\r\n\r\n let fn = this.key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === 3) {\r\n fn = resolver.state;\r\n }\r\n\r\n const instance = container.invoke(fn as DependencyCtorOrFunctor, dynamicDependencies);\r\n container.registerInstance(this.asKey, instance);\r\n return instance;\r\n }\r\n\r\n /**\r\n * Instructs the NewInstance resolver to register the resolved instance using\r\n * the supplied key.\r\n * @param key The key to register the instance with.\r\n * @return Returns the NewInstance resolver.\r\n */\r\n public as(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this.asKey = key;\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates an NewInstance Resolver for the supplied key.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n * @return Returns an instance of NewInstance for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtorOrFunctor,\r\n ...dynamicDependencies: TArgs[number][]): NewInstance {\r\n return new NewInstance(key, ...dynamicDependencies);\r\n }\r\n}\r\n\r\n/**\r\n * Used by parameter decorators to call autoinject for the target and retrieve\r\n * the target's inject property.\r\n * @param target The target class.\r\n * @return Returns the target's own inject property.\r\n */\r\nexport function getDecoratorDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] }\r\n ) {\r\n autoinject(target);\r\n\r\n return target.inject;\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should be lazy loaded\r\n */\r\nexport function lazy<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: { new (...args: TArgs): TBase | TImpl },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Lazy.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should load all instances of the given\r\n * key.\r\n */\r\nexport function all<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = All.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as optional\r\n */\r\nexport function optional<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n checkParentOrTarget: boolean = true) {\r\n const deco = (checkParent: boolean) => {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Optional.of(inject[index], checkParent);\r\n };\r\n };\r\n if (typeof checkParentOrTarget === 'boolean') {\r\n return deco(checkParentOrTarget);\r\n }\r\n return deco(true);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to look at the parent container for\r\n * resolution\r\n */\r\nexport function parent<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Parent.of(inject[index]);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to create a factory method, that can\r\n * accept optional arguments\r\n */\r\nexport function factory<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Factory.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as a new instance. Instances can optionally be registered in the container\r\n * under a different key and/or use dynamic dependencies\r\n */\r\nexport function newInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n asKeyOrTarget?: PrimitiveOrDependencyCtor & { inject?: TArgs[number][] },\r\n ...dynamicDependencies: TArgs[number][]\r\n) {\r\n const deco = (asKey?: typeof asKeyOrTarget) => {\r\n return (\r\n target: { new (...args: any[]): any },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = NewInstance.of(inject[index], ...dynamicDependencies);\r\n if (!!asKey) {\r\n inject[index].as(asKey);\r\n }\r\n };\r\n };\r\n if (arguments.length >= 1) {\r\n return deco(asKeyOrTarget);\r\n }\r\n return deco();\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { AggregateError } from 'aurelia-pal';\r\nimport { resolver, StrategyResolver, Resolver, Strategy, StrategyState, Factory, NewInstance, Lazy, Optional, All, Parent } from './resolvers';\r\nimport { Invoker } from './invokers';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n DependencyCtor,\r\n PrimitiveOrDependencyCtor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args,\r\n Primitive\r\n} from './types';\r\n\r\nlet currentContainer: Container | null = null;\r\n\r\nfunction validateKey(key: any) {\r\n if (key === null || key === undefined) {\r\n throw new Error(\r\n 'key/value cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport const _emptyParameters = Object.freeze([]) as [];\r\n\r\nmetadata.registration = 'aurelia:registration';\r\nmetadata.invoker = 'aurelia:invoker';\r\n\r\nconst resolverDecorates = resolver.decorates!;\r\n\r\n/**\r\n * Stores the information needed to invoke a function.\r\n */\r\nexport class InvocationHandler<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args\r\n > {\r\n /**\r\n * The function to be invoked by this handler.\r\n */\r\n public fn: DependencyCtorOrFunctor;\r\n\r\n /**\r\n * The invoker implementation that will be used to actually invoke the function.\r\n */\r\n public invoker: Invoker;\r\n\r\n /**\r\n * The statically known dependencies of this function invocation.\r\n */\r\n public dependencies: TArgs;\r\n\r\n /**\r\n * Instantiates an InvocationDescription.\r\n * @param fn The Function described by this description object.\r\n * @param invoker The strategy for invoking the function.\r\n * @param dependencies The static dependencies of the function call.\r\n */\r\n constructor(\r\n fn: DependencyCtorOrFunctor,\r\n invoker: Invoker,\r\n dependencies: TArgs\r\n ) {\r\n this.fn = fn;\r\n this.invoker = invoker;\r\n this.dependencies = dependencies;\r\n }\r\n\r\n /**\r\n * Invokes the function.\r\n * @param container The calling container.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(container: Container, dynamicDependencies?: TArgs[]): TImpl {\r\n const previousContainer = currentContainer;\r\n currentContainer = container;\r\n try {\r\n return dynamicDependencies !== undefined\r\n ? this.invoker.invokeWithDynamicDependencies(\r\n container,\r\n this.fn,\r\n this.dependencies,\r\n dynamicDependencies\r\n )\r\n : this.invoker.invoke(container, this.fn, this.dependencies);\r\n } finally {\r\n currentContainer = previousContainer;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Used to configure a Container instance.\r\n */\r\nexport interface ContainerConfiguration {\r\n /**\r\n * An optional callback which will be called when any function needs an\r\n * InvocationHandler created (called once per Function).\r\n */\r\n onHandlerCreated?: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n handlers?: Map;\r\n}\r\n\r\nfunction invokeWithDynamicDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n) {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n let lookup;\r\n\r\n while (i--) {\r\n lookup = staticDependencies[i];\r\n\r\n if (lookup === null || lookup === undefined) {\r\n throw new Error(\r\n 'Constructor Parameter with index ' +\r\n i +\r\n ' cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n } else {\r\n args[i] = container.get(lookup);\r\n }\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return Reflect.construct(fn, args);\r\n}\r\n\r\nconst classInvoker: Invoker = {\r\n invoke(container, Type: DependencyCtor, deps) {\r\n const instances = deps.map((dep) => container.get(dep));\r\n return Reflect.construct(Type, instances);\r\n },\r\n invokeWithDynamicDependencies\r\n};\r\n\r\nfunction getDependencies(f) {\r\n if (!f.hasOwnProperty('inject')) {\r\n return [];\r\n }\r\n\r\n if (typeof f.inject === 'function') {\r\n return f.inject();\r\n }\r\n\r\n return f.inject;\r\n}\r\n\r\n/**\r\n * A lightweight, extensible dependency injection container.\r\n */\r\nexport class Container {\r\n /**\r\n * The global root Container instance. Available if makeGlobal() has been\r\n * called. Aurelia Framework calls makeGlobal().\r\n */\r\n public static instance: Container;\r\n\r\n /**\r\n * The parent container in the DI hierarchy.\r\n */\r\n public parent: Container | null;\r\n\r\n /**\r\n * The root container in the DI hierarchy.\r\n */\r\n public root: Container;\r\n\r\n /** @internal */\r\n public _configuration: ContainerConfiguration;\r\n\r\n /** @internal */\r\n public _onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n /** @internal */\r\n public _handlers: Map;\r\n\r\n /** @internal */\r\n public _resolvers: Map;\r\n\r\n /**\r\n * Creates an instance of Container.\r\n * @param configuration Provides some configuration for the new Container instance.\r\n */\r\n constructor(configuration?: ContainerConfiguration) {\r\n if (configuration === undefined) {\r\n configuration = {};\r\n }\r\n\r\n this._configuration = configuration;\r\n this._onHandlerCreated = configuration.onHandlerCreated!;\r\n this._handlers =\r\n configuration.handlers || (configuration.handlers = new Map());\r\n this._resolvers = new Map();\r\n this.root = this;\r\n this.parent = null;\r\n }\r\n\r\n /**\r\n * Makes this container instance globally reachable through Container.instance.\r\n */\r\n public makeGlobal(): Container {\r\n Container.instance = this;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets an invocation handler creation callback that will be called when new\r\n * InvocationsHandlers are created (called once per Function).\r\n * @param onHandlerCreated The callback to be called when an\r\n * InvocationsHandler is created.\r\n */\r\n public setHandlerCreatedCallback<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler\r\n ) {\r\n this._onHandlerCreated = onHandlerCreated;\r\n this._configuration.onHandlerCreated = onHandlerCreated;\r\n }\r\n\r\n /**\r\n * Registers an existing object instance with the container.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param instance The instance that will be resolved when the key is matched.\r\n * This defaults to the key value when instance is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerInstance = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n instance?: TImpl): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(0, instance === undefined ? key : instance)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container always\r\n * returns the same instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.singleton, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container returns a\r\n * new instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(2, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param handler The resolution function to use when the dependency is\r\n * needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerHandler = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n handler: (container?: Container, key?: PrimitiveOrDependencyCtor, resolver?: Resolver) => any\r\n ): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.function, handler)\r\n );\r\n }\r\n\r\n /**\r\n * Registers an additional key that serves as an alias to the original DI key.\r\n * @param originalKey The key that originally identified the dependency; usually a constructor function.\r\n * @param aliasKey An alternate key which can also be used to resolve the same dependency as the original.\r\n * @return The resolver that was registered.\r\n */\r\n public registerAlias = Impl, TArgs extends Args = Args>(\r\n originalKey: PrimitiveOrDependencyCtor,\r\n aliasKey: PrimitiveOrDependencyCtor): Resolver {\r\n return this.registerResolver(\r\n aliasKey,\r\n new StrategyResolver(5, originalKey)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param resolver The resolver to use when the dependency is needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n resolver: Resolver\r\n ): Resolver {\r\n validateKey(key);\r\n\r\n const allResolvers = this._resolvers;\r\n const result = allResolvers.get(key);\r\n\r\n if (result === undefined) {\r\n allResolvers.set(key, resolver);\r\n } else if (result.strategy === 4) {\r\n result.state.push(resolver);\r\n } else {\r\n allResolvers.set(key, new StrategyResolver(4, [result, resolver]));\r\n }\r\n\r\n return resolver;\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) by inspecting its registration\r\n * annotations. If none are found, then the default singleton registration is\r\n * used.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n */\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n fn = fn === undefined ? key as DependencyCtor : fn;\r\n\r\n if (typeof fn === 'function') {\r\n const registration = metadata.get(metadata.registration, fn);\r\n\r\n if (registration === undefined) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn));\r\n }\r\n\r\n return registration.registerResolver(this, key, fn);\r\n }\r\n\r\n return this.registerResolver(key, new StrategyResolver(0, fn));\r\n }\r\n\r\n /**\r\n * Registers an array of types (constructor functions) by inspecting their\r\n * registration annotations. If none are found, then the default singleton\r\n * registration is used.\r\n * @param fns The constructor function to use when the dependency needs to be instantiated.\r\n */\r\n public autoRegisterAll(fns: DependencyCtor[]): void {\r\n let i = fns.length;\r\n while (i--) {\r\n this.autoRegister(fns[i]);\r\n }\r\n }\r\n\r\n /**\r\n * Unregisters based on key.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n */\r\n public unregister(key: any): void {\r\n this._resolvers.delete(key);\r\n }\r\n\r\n /**\r\n * Inspects the container to determine if a particular key has been registred.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @param checkParent Indicates whether or not to check the parent container hierarchy.\r\n * @return Returns true if the key has been registred; false otherwise.\r\n */\r\n public hasResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, checkParent: boolean = false): boolean {\r\n validateKey(key);\r\n\r\n return (\r\n this._resolvers.has(key) ||\r\n (checkParent &&\r\n this.parent !== null &&\r\n this.parent.hasResolver(key, checkParent))\r\n );\r\n }\r\n\r\n /**\r\n * Gets the resolver for the particular key, if it has been registered.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @return Returns the resolver, if registred, otherwise undefined.\r\n */\r\n public getResolver<\r\n TStrategyKey extends keyof StrategyState,\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n >(\r\n key: PrimitiveOrDependencyCtorOrFunctor\r\n ): StrategyResolver {\r\n return this._resolvers.get(key);\r\n }\r\n\r\n /**\r\n * Resolves a single instance based on the provided key.\r\n * @param key The key that identifies the object to resolve.\r\n * @return Returns the resolved instance.\r\n */\r\n public get | Lazy | Factory | Optional | Parent | All>(\r\n key: TResolver): ResolvedValue;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: typeof Container): Container;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor | typeof Container): ImplOrAny | Container {\r\n validateKey(key);\r\n\r\n if (key === Container) {\r\n return this;\r\n }\r\n\r\n if (resolverDecorates(key)) {\r\n return key.get(this, key);\r\n }\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key as DependencyCtor).get(this, key);\r\n }\r\n\r\n const registration = metadata.get(metadata.registration, key);\r\n\r\n if (registration === undefined) {\r\n return this.parent._get(key);\r\n }\r\n\r\n return registration.registerResolver(\r\n this, key, key as DependencyCtorOrFunctor).get(this, key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n public _get(key) {\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n\r\n return this.parent._get(key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n /**\r\n * Resolves all instance registered under the provided key.\r\n * @param key The key that identifies the objects to resolve.\r\n * @return Returns an array of the resolved instances.\r\n */\r\n public getAll = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny[] {\r\n validateKey(key);\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return _emptyParameters;\r\n }\r\n\r\n return this.parent.getAll(key);\r\n }\r\n\r\n if (resolver.strategy === 4) {\r\n const state = resolver.state;\r\n let i = state.length;\r\n const results = new Array(i);\r\n\r\n while (i--) {\r\n results[i] = state[i].get(this, key);\r\n }\r\n\r\n return results;\r\n }\r\n\r\n return [resolver.get(this, key)];\r\n }\r\n\r\n /**\r\n * Creates a new dependency injection container whose parent is the current container.\r\n * @return Returns a new container instance parented to this.\r\n */\r\n public createChild(): Container {\r\n const child = new Container(this._configuration);\r\n child.root = this.root;\r\n child.parent = this;\r\n return child;\r\n }\r\n\r\n /**\r\n * Invokes a function, recursively resolving its dependencies.\r\n * @param fn The function to invoke with the auto-resolved dependencies.\r\n * @param dynamicDependencies Additional function dependencies to use during invocation.\r\n * @return Returns the instance resulting from calling the function.\r\n */\r\n public invoke = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor,\r\n dynamicDependencies?: TArgs[number][]\r\n ): ImplOrAny {\r\n try {\r\n let handler = this._handlers.get(fn);\r\n\r\n if (handler === undefined) {\r\n handler = this._createInvocationHandler(fn);\r\n this._handlers.set(fn, handler);\r\n }\r\n\r\n return handler.invoke(this, dynamicDependencies);\r\n } catch (e) {\r\n // @ts-expect-error AggregateError returns an Error in its type hence it fails (new ...) but it's fine\r\n throw new AggregateError(\r\n `Error invoking ${fn.name}. Check the inner error for details.`,\r\n e as Error | undefined,\r\n true\r\n );\r\n }\r\n }\r\n\r\n public _createInvocationHandler\r\n = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor & { inject?: any; }\r\n ): InvocationHandler {\r\n let dependencies;\r\n\r\n if (fn.inject === undefined) {\r\n dependencies =\r\n metadata.getOwn(metadata.paramTypes, fn) || _emptyParameters;\r\n } else {\r\n dependencies = [];\r\n let ctor = fn;\r\n while (typeof ctor === 'function') {\r\n dependencies.push(...getDependencies(ctor));\r\n ctor = Object.getPrototypeOf(ctor);\r\n }\r\n }\r\n\r\n const invoker = metadata.getOwn(metadata.invoker, fn) || classInvoker;\r\n\r\n const handler = new InvocationHandler(fn, invoker, dependencies);\r\n return this._onHandlerCreated !== undefined\r\n ? this._onHandlerCreated(handler)\r\n : handler;\r\n }\r\n}\r\n\r\nexport type ResolvedValue =\r\n T extends (new (...args: any[]) => infer R)\r\n ? R\r\n : T extends (abstract new (...args: any[]) => infer R)\r\n ? R\r\n : T extends Factory\r\n ? (...args: unknown[]) => R\r\n : T extends Lazy\r\n ? () => R\r\n : T extends NewInstance\r\n ? R\r\n : T extends Optional\r\n ? R | null\r\n : T extends All\r\n ? R[]\r\n : T extends Parent\r\n ? R | null\r\n : T extends [infer T1, ...infer T2]\r\n ? [ResolvedValue, ...ResolvedValue]\r\n : T;\r\n\r\n/**\r\n * Resolve a key, or list of keys based on the current container.\r\n * \r\n * @example\r\n * ```ts\r\n * import { resolve } from 'aurelia-framework';\r\n * // or\r\n * // import { Container, resolve } from 'aurelia-dependency-injection';\r\n * \r\n * class MyCustomElement {\r\n * someService = resolve(MyService);\r\n * }\r\n * ```\r\n */\r\nexport function resolve(key: K): ResolvedValue;\r\nexport function resolve(...keys: K): ResolvedValue\r\nexport function resolve(...keys: K) {\r\n if (currentContainer == null) {\r\n throw new Error(`There is not a currently active container to resolve \"${String(keys)}\". Are you trying to \"new SomeClass(...)\" that has a resolve(...) call?`);\r\n }\r\n \r\n return keys.length === 1\r\n ? currentContainer.get(keys[0])\r\n : keys.map(containerGetKey, currentContainer);\r\n}\r\n\r\nfunction containerGetKey(this: Container, key: any) {\r\n return this.get(key);\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { DependencyCtorOrFunctor, ImplOrAny, Impl, Args, DependencyCtor, DependencyFunctor } from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom Invoker for the decorated item.\r\n */\r\nexport function invoker, TArgs extends Args>(\r\n value: Invoker\r\n): (target: DependencyCtor) => void {\r\n return target => {\r\n metadata.define(metadata.invoker, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies that the decorated item should be called as a factory\r\n * function, rather than a constructor.\r\n */\r\nexport function invokeAsFactory, TArgs extends Args>(\r\n potentialTarget?: DependencyCtor\r\n): void | ((target: DependencyCtor) => void) {\r\n const deco = (target: DependencyCtor) => {\r\n metadata.define(metadata.invoker, FactoryInvoker.instance, target);\r\n };\r\n\r\n return potentialTarget ? deco(potentialTarget) : deco;\r\n}\r\n\r\n/**\r\n * A strategy for invoking a function, resulting in an object instance.\r\n */\r\nexport interface Invoker, TArgs extends Args> {\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during\r\n * invocation.\r\n * @return The result of the function invocation.\r\n */\r\n invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny;\r\n}\r\n\r\n/**\r\n * An Invoker that is used to invoke a factory method.\r\n */\r\nexport class FactoryInvoker<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > implements Invoker {\r\n /**\r\n * The singleton instance of the FactoryInvoker.\r\n */\r\n public static instance: FactoryInvoker;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny {\r\n let i = dependencies.length;\r\n const args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(dependencies[i]);\r\n }\r\n\r\n return ((fn as DependencyFunctor).apply(undefined, args as TArgs)) as ImplOrAny;\r\n }\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(staticDependencies[i]);\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return (fn as DependencyFunctor).apply(undefined, args as TArgs) as ImplOrAny;\r\n }\r\n}\r\n\r\nFactoryInvoker.instance = new FactoryInvoker();\r\n","import './internal';\r\nimport { Resolver } from './resolvers';\r\nimport { Container } from './container';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtor,\r\n Impl,\r\n Args,\r\n DependencyCtor\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom registration strategy for the decorated\r\n * class/function.\r\n */\r\nexport function registration, TArgs extends Args>(\r\n value: Registration) {\r\n return (target: DependencyCtor) => {\r\n metadata.define(metadata.registration, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"transient\"\r\n * lifetime.\r\n */\r\nexport function transient, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor) {\r\n return registration(new TransientRegistration(key));\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"singleton\"\r\n * lifetime.\r\n */\r\nexport function singleton(registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor, registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean, registerInChild: boolean = false) {\r\n return registration(\r\n new SingletonRegistration(keyOrRegisterInChild, registerInChild)\r\n );\r\n}\r\n\r\n/**\r\n * Customizes how a particular function is resolved by the Container.\r\n */\r\nexport interface Registration<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args> {\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver;\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * transients with the container.\r\n */\r\nexport class TransientRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of TransientRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(key?: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const existingResolver = container.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? container.registerTransient(\r\n (this._key || key) as string,\r\n fn as DependencyCtorOrFunctor)\r\n : existingResolver;\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * singletons with the container.\r\n */\r\nexport class SingletonRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _registerInChild: boolean;\r\n\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of SingletonRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean,\r\n registerInChild: boolean = false) {\r\n if (typeof keyOrRegisterInChild === 'boolean') {\r\n this._registerInChild = keyOrRegisterInChild;\r\n } else {\r\n this._key = keyOrRegisterInChild;\r\n this._registerInChild = registerInChild;\r\n }\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const targetContainer = this._registerInChild ? container : container.root;\r\n const existingResolver = targetContainer.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? targetContainer.registerSingleton(this._key || key, fn)\r\n : existingResolver;\r\n }\r\n}\r\n"],"names":["metadata","protocol","Strategy","AggregateError"],"mappings":";;IAAA;IACA;AACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AACA;AAsCA;IACO,SAAS,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;IAC1D,IAAI,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;IACjI,IAAI,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IACnI,SAAS,KAAK,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;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3E,QAAA,IAAM,gBAAgB,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC;YACvE,OAAO,gBAAgB,KAAK,SAAS;IACnC,cAAE,eAAe,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,EAAE,EAAE,CAAC;kBACvD,gBAAgB,CAAC;SACtB,CAAA;QACH,OAAC,qBAAA,CAAA;IAAD,CAAC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/dist/aurelia-dependency-injection.d.ts b/dist/aurelia-dependency-injection.d.ts index 25eebfe..4362e0c 100644 --- a/dist/aurelia-dependency-injection.d.ts +++ b/dist/aurelia-dependency-injection.d.ts @@ -578,9 +578,7 @@ export declare class Container { inject?: any; }): InvocationHandler; } -export type ResolvedValue = T extends { - new (...args: any[]): infer R; -} ? R : T extends Factory ? (...args: unknown[]) => R : T extends Lazy ? () => R : T extends NewInstance ? R : T extends Optional ? R | null : T extends All ? R[] : T extends Parent ? R | null : T extends [ +export type ResolvedValue = T extends (new (...args: any[]) => infer R) ? R : T extends (abstract new (...args: any[]) => infer R) ? R : T extends Factory ? (...args: unknown[]) => R : T extends Lazy ? () => R : T extends NewInstance ? R : T extends Optional ? R | null : T extends All ? R[] : T extends Parent ? R | null : T extends [ infer T1, ...infer T2 ] ? [ diff --git a/dist/commonjs/aurelia-dependency-injection.js.map b/dist/commonjs/aurelia-dependency-injection.js.map index 47a586b..032d20f 100644 --- a/dist/commonjs/aurelia-dependency-injection.js.map +++ b/dist/commonjs/aurelia-dependency-injection.js.map @@ -1 +1 @@ -{"version":3,"file":"aurelia-dependency-injection.js","sources":["../../node_modules/tslib/tslib.es6.js","../../../src/injection.ts","../../../src/resolvers.ts","../../../src/container.ts","../../../src/invokers.ts","../../../src/registrations.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","import { metadata } from 'aurelia-metadata';\r\nimport { _emptyParameters } from './container';\r\nimport { Args, Impl, DependencyCtor } from './types';\r\n\r\n// tslint:disable-next-line:ban-types\r\nexport type Injectable = Function & { inject?: any[] | (() => any[]) };\r\n\r\nfunction isInjectable(potentialTarget: any): potentialTarget is Injectable {\r\n return !!potentialTarget;\r\n}\r\n\r\n/**\r\n * Decorator: Directs the TypeScript transpiler to write-out type metadata for\r\n * the decorated class.\r\n */\r\nexport function autoinject(\r\n potentialTarget?: TPotential\r\n): TPotential extends Injectable ? void : (target: Injectable) => void {\r\n const deco = (target: Injectable): void => {\r\n if (!target.hasOwnProperty('inject')) {\r\n target.inject = (\r\n (metadata.getOwn(metadata.paramTypes, target) as any[]) ||\r\n _emptyParameters\r\n ).slice();\r\n if (target.inject && target.inject.length > 0) {\r\n // TypeScript 3.0 metadata for \"...rest\" gives type \"Object\"\r\n // if last parameter is \"Object\", assume it's a ...rest and remove that\r\n // metadata.\r\n if (target.inject[target.inject.length - 1] === Object) {\r\n target.inject.splice(-1, 1);\r\n }\r\n }\r\n }\r\n };\r\n if (isInjectable(potentialTarget)) {\r\n return deco(potentialTarget) as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n }\r\n return deco as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n}\r\n/**\r\n * Decorator: Specifies the dependencies that should be injected by the DI Container into the decorated class/function.\r\n */\r\nexport function inject<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(...rest: TArgs[number][]): any {\r\n return (\r\n target: DependencyCtor & { inject: any },\r\n _key: any,\r\n descriptor: any) => {\r\n // handle when used as a constructor parameter decorator\r\n if (typeof descriptor === 'number') {\r\n autoinject(target);\r\n if (rest.length === 1) {\r\n target.inject[descriptor] = rest[0];\r\n }\r\n return;\r\n }\r\n // if it's true then we injecting rest into function and not Class constructor\r\n if (descriptor) {\r\n const fn = descriptor.value;\r\n fn.inject = rest;\r\n } else {\r\n target.inject = rest;\r\n }\r\n };\r\n}\r\n","import { protocol } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { autoinject } from './injection';\r\nimport type {\r\n PrimitiveOrDependencyCtor,\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n DependencyCtor,\r\n DependencyFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Indicates that the decorated class/object is a custom resolver.\r\n */\r\nexport const resolver: {\r\n decorates?: (key: any) => key is { get(container: Container, key: any): any };\r\n} & (() => any) = ((protocol as unknown) as { create(...args: any[]): any }).create(\r\n 'aurelia:resolver',\r\n (target): string | boolean => {\r\n if (!(typeof target.get === 'function')) {\r\n return 'Resolvers must implement: get(container: Container, key: any): any';\r\n }\r\n\r\n return true;\r\n }\r\n);\r\n\r\n/**\r\n * Used to allow functions/classes to specify custom dependency resolution logic.\r\n */\r\nexport interface Resolver {\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n get(container: Container, key: any): any;\r\n}\r\n\r\nexport enum Strategy {\r\n instance = 0,\r\n singleton = 1,\r\n transient = 2,\r\n function = 3,\r\n array = 4,\r\n alias = 5\r\n}\r\nexport type IStrategy = 1 | 2 | 3 | 4 | 5;\r\n\r\nexport type StrategyFunctor<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > = (\r\n container?: Container,\r\n ctor?: PrimitiveOrDependencyCtorOrFunctor,\r\n strategyResolver?: any\r\n ) => TImpl;\r\n\r\nexport interface StrategyState<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > {\r\n [Strategy.instance]: TImpl;\r\n [Strategy.singleton]: DependencyCtorOrFunctor;\r\n [Strategy.transient]: DependencyCtorOrFunctor;\r\n [Strategy.function]: StrategyFunctor;\r\n /**\r\n * For typings purposes, this is done as ({ get: StrategyFunctor } | TImpl)[]\r\n * But it should be understood, and used as [{ get: StrategyFunctor }, ...TImp[]]\r\n */\r\n [Strategy.array]: ({\r\n get: (\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor\r\n ) => TImpl\r\n } | TImpl)[];\r\n [Strategy.alias]: any;\r\n}\r\n\r\nfunction isStrategy<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TKey extends keyof StrategyState\r\n>(\r\n actual: Strategy,\r\n expected: TKey,\r\n state):\r\n state is StrategyState[TKey] {\r\n return actual === expected;\r\n}\r\n/**\r\n * Used to resolve instances, singletons, transients, aliases\r\n */\r\n@resolver()\r\nexport class StrategyResolver<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TStrategyKey extends keyof StrategyState> {\r\n\r\n public strategy: keyof StrategyState;\r\n public state: StrategyState[keyof StrategyState];\r\n\r\n /**\r\n * Creates an instance of the StrategyResolver class.\r\n * @param strategy The type of resolution strategy.\r\n * @param state The state associated with the resolution strategy.\r\n */\r\n constructor(strategy: TStrategyKey, state: StrategyState[TStrategyKey]) {\r\n this.strategy = strategy;\r\n this.state = state;\r\n }\r\n\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n public get(container: Container, key: PrimitiveOrDependencyCtor) {\r\n if (isStrategy(this.strategy, Strategy.instance, this.state)) {\r\n return this.state;\r\n }\r\n if (isStrategy(this.strategy, Strategy.singleton, this.state)) {\r\n const singleton = container.invoke(this.state);\r\n this.state = singleton;\r\n this.strategy = 0;\r\n return singleton;\r\n }\r\n if (isStrategy(this.strategy, Strategy.transient, this.state)) {\r\n return container.invoke(this.state);\r\n }\r\n if (isStrategy(this.strategy, Strategy.function, this.state)) {\r\n return this.state(container, key, this);\r\n }\r\n if (isStrategy(this.strategy, Strategy.array, this.state)) {\r\n return (this.state[0] as { get: StrategyFunctor }).get(container, key);\r\n }\r\n if (isStrategy(this.strategy, Strategy.alias, this.state)) {\r\n return container.get(this.state) as TImpl;\r\n }\r\n throw new Error('Invalid strategy: ' + this.strategy);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify lazy resolution logic.\r\n */\r\n@resolver()\r\nexport class Lazy = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'lazy';\r\n\r\n /**\r\n * Creates an instance of the Lazy class.\r\n * @param key The key to lazily resolve.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to lazily resolve the dependency into a lazy locator\r\n * function.\r\n * @param container The container to resolve from.\r\n * @return Returns a function which can be invoked at a later time to obtain\r\n * the actual dependency.\r\n */\r\n public get(container: Container): () => ImplOrAny {\r\n return () => container.get(this._key);\r\n }\r\n\r\n /**\r\n * Creates a Lazy Resolver for the supplied key.\r\n * @param key The key to lazily resolve.\r\n * @return Returns an instance of Lazy for the key.\r\n */\r\n public static of<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ) {\r\n return new Lazy(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify resolution of all matches to a key.\r\n */\r\n@resolver()\r\nexport class All = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'all';\r\n\r\n /**\r\n * Creates an instance of the All class.\r\n * @param key The key to lazily resolve all matches for.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to resolve all matching dependencies as an array of\r\n * instances.\r\n * @param container The container to resolve from.\r\n * @return Returns an array of all matching instances.\r\n */\r\n public get(container: Container): TImpl[] {\r\n return container.getAll(this._key);\r\n }\r\n\r\n /**\r\n * Creates an All Resolver for the supplied key.\r\n * @param key The key to resolve all instances for.\r\n * @return Returns an instance of All for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): All {\r\n return new All(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify an optional dependency, which will\r\n * be resolved only if already registred with the container.\r\n */\r\n@resolver()\r\nexport class Optional = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /** @internal */\r\n public _checkParent: boolean;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'optional';\r\n\r\n /**\r\n * Creates an instance of the Optional class.\r\n * @param key The key to optionally resolve for.\r\n * @param checkParent Indicates whether or not the parent container hierarchy\r\n * should be checked.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor, checkParent: boolean = true) {\r\n this._key = key;\r\n this._checkParent = checkParent;\r\n }\r\n\r\n /**\r\n * Called by the container to provide optional resolution of the key.\r\n * @param container The container to resolve from.\r\n * @return Returns the instance if found; otherwise null.\r\n */\r\n public get(container: Container): TImpl | null {\r\n if (container.hasResolver(this._key, this._checkParent)) {\r\n return container.get(this._key);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Creates an Optional Resolver for the supplied key.\r\n * @param key The key to optionally resolve for.\r\n * @param [checkParent=true] Indicates whether or not the parent container\r\n * hierarchy should be checked.\r\n * @return Returns an instance of Optional for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n checkParent: boolean = true): Optional {\r\n return new Optional(key, checkParent);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject the dependency from the parent container instead of the current\r\n * one.\r\n */\r\n@resolver()\r\nexport class Parent = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'parent';\r\n\r\n /**\r\n * Creates an instance of the Parent class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to load the dependency from the parent container\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container): TImpl | null {\r\n return container.parent ? container.parent.get(this._key) : null;\r\n }\r\n\r\n /**\r\n * Creates a Parent Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Parent for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): Parent {\r\n return new Parent(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow injecting dependencies but also passing data to the constructor.\r\n */\r\n@resolver()\r\nexport class Factory = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtorOrFunctor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'factory';\r\n\r\n /**\r\n * Creates an instance of the Factory class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to pass the dependencies to the constructor.\r\n * @param container The container to invoke the constructor with dependencies\r\n * and other parameters.\r\n * @return Returns a function that can be invoked to resolve dependencies\r\n * later, and the rest of the parameters.\r\n */\r\n public get(container: Container): DependencyFunctor {\r\n let fn = this._key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === Strategy.function) {\r\n fn = resolver.state;\r\n }\r\n\r\n return (...rest) => container.invoke(fn as DependencyCtorOrFunctor, rest);\r\n }\r\n\r\n /**\r\n * Creates a Factory Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Factory for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: DependencyCtor\r\n ): Factory {\r\n return new Factory(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject a new instance of a dependency, without regard for existing\r\n * instances in the container. Instances can optionally be registered in the\r\n * container\r\n * under a different key by supplying a key using the `as` method.\r\n */\r\n@resolver()\r\nexport class NewInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public key: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public asKey: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public dynamicDependencies: TArgs[number][];\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'newInstance';\r\n\r\n /**\r\n * Creates an instance of the NewInstance class.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor, ...dynamicDependencies: TArgs[number][]) {\r\n this.key = key;\r\n this.asKey = key;\r\n this.dynamicDependencies = dynamicDependencies;\r\n }\r\n\r\n /**\r\n * Called by the container to instantiate the dependency and potentially\r\n * register\r\n * as another key if the `as` method was used.\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container) {\r\n const dynamicDependencies =\r\n this.dynamicDependencies.length > 0\r\n ? this.dynamicDependencies.map(dependency =>\r\n dependency['protocol:aurelia:resolver']\r\n ? dependency.get(container)\r\n : container.get(dependency)\r\n )\r\n : undefined;\r\n\r\n let fn = this.key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === 3) {\r\n fn = resolver.state;\r\n }\r\n\r\n const instance = container.invoke(fn as DependencyCtorOrFunctor, dynamicDependencies);\r\n container.registerInstance(this.asKey, instance);\r\n return instance;\r\n }\r\n\r\n /**\r\n * Instructs the NewInstance resolver to register the resolved instance using\r\n * the supplied key.\r\n * @param key The key to register the instance with.\r\n * @return Returns the NewInstance resolver.\r\n */\r\n public as(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this.asKey = key;\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates an NewInstance Resolver for the supplied key.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n * @return Returns an instance of NewInstance for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtorOrFunctor,\r\n ...dynamicDependencies: TArgs[number][]): NewInstance {\r\n return new NewInstance(key, ...dynamicDependencies);\r\n }\r\n}\r\n\r\n/**\r\n * Used by parameter decorators to call autoinject for the target and retrieve\r\n * the target's inject property.\r\n * @param target The target class.\r\n * @return Returns the target's own inject property.\r\n */\r\nexport function getDecoratorDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] }\r\n ) {\r\n autoinject(target);\r\n\r\n return target.inject;\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should be lazy loaded\r\n */\r\nexport function lazy<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: { new (...args: TArgs): TBase | TImpl },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Lazy.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should load all instances of the given\r\n * key.\r\n */\r\nexport function all<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = All.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as optional\r\n */\r\nexport function optional<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n checkParentOrTarget: boolean = true) {\r\n const deco = (checkParent: boolean) => {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Optional.of(inject[index], checkParent);\r\n };\r\n };\r\n if (typeof checkParentOrTarget === 'boolean') {\r\n return deco(checkParentOrTarget);\r\n }\r\n return deco(true);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to look at the parent container for\r\n * resolution\r\n */\r\nexport function parent<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Parent.of(inject[index]);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to create a factory method, that can\r\n * accept optional arguments\r\n */\r\nexport function factory<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Factory.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as a new instance. Instances can optionally be registered in the container\r\n * under a different key and/or use dynamic dependencies\r\n */\r\nexport function newInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n asKeyOrTarget?: PrimitiveOrDependencyCtor & { inject?: TArgs[number][] },\r\n ...dynamicDependencies: TArgs[number][]\r\n) {\r\n const deco = (asKey?: typeof asKeyOrTarget) => {\r\n return (\r\n target: { new (...args: any[]): any },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = NewInstance.of(inject[index], ...dynamicDependencies);\r\n if (!!asKey) {\r\n inject[index].as(asKey);\r\n }\r\n };\r\n };\r\n if (arguments.length >= 1) {\r\n return deco(asKeyOrTarget);\r\n }\r\n return deco();\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { AggregateError } from 'aurelia-pal';\r\nimport { resolver, StrategyResolver, Resolver, Strategy, StrategyState, Factory, NewInstance, Lazy, Optional, All, Parent } from './resolvers';\r\nimport { Invoker } from './invokers';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n DependencyCtor,\r\n PrimitiveOrDependencyCtor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args,\r\n Primitive\r\n} from './types';\r\n\r\nlet currentContainer: Container | null = null;\r\n\r\nfunction validateKey(key: any) {\r\n if (key === null || key === undefined) {\r\n throw new Error(\r\n 'key/value cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport const _emptyParameters = Object.freeze([]) as [];\r\n\r\nmetadata.registration = 'aurelia:registration';\r\nmetadata.invoker = 'aurelia:invoker';\r\n\r\nconst resolverDecorates = resolver.decorates!;\r\n\r\n/**\r\n * Stores the information needed to invoke a function.\r\n */\r\nexport class InvocationHandler<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args\r\n > {\r\n /**\r\n * The function to be invoked by this handler.\r\n */\r\n public fn: DependencyCtorOrFunctor;\r\n\r\n /**\r\n * The invoker implementation that will be used to actually invoke the function.\r\n */\r\n public invoker: Invoker;\r\n\r\n /**\r\n * The statically known dependencies of this function invocation.\r\n */\r\n public dependencies: TArgs;\r\n\r\n /**\r\n * Instantiates an InvocationDescription.\r\n * @param fn The Function described by this description object.\r\n * @param invoker The strategy for invoking the function.\r\n * @param dependencies The static dependencies of the function call.\r\n */\r\n constructor(\r\n fn: DependencyCtorOrFunctor,\r\n invoker: Invoker,\r\n dependencies: TArgs\r\n ) {\r\n this.fn = fn;\r\n this.invoker = invoker;\r\n this.dependencies = dependencies;\r\n }\r\n\r\n /**\r\n * Invokes the function.\r\n * @param container The calling container.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(container: Container, dynamicDependencies?: TArgs[]): TImpl {\r\n const previousContainer = currentContainer;\r\n currentContainer = container;\r\n try {\r\n return dynamicDependencies !== undefined\r\n ? this.invoker.invokeWithDynamicDependencies(\r\n container,\r\n this.fn,\r\n this.dependencies,\r\n dynamicDependencies\r\n )\r\n : this.invoker.invoke(container, this.fn, this.dependencies);\r\n } finally {\r\n currentContainer = previousContainer;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Used to configure a Container instance.\r\n */\r\nexport interface ContainerConfiguration {\r\n /**\r\n * An optional callback which will be called when any function needs an\r\n * InvocationHandler created (called once per Function).\r\n */\r\n onHandlerCreated?: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n handlers?: Map;\r\n}\r\n\r\nfunction invokeWithDynamicDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n) {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n let lookup;\r\n\r\n while (i--) {\r\n lookup = staticDependencies[i];\r\n\r\n if (lookup === null || lookup === undefined) {\r\n throw new Error(\r\n 'Constructor Parameter with index ' +\r\n i +\r\n ' cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n } else {\r\n args[i] = container.get(lookup);\r\n }\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return Reflect.construct(fn, args);\r\n}\r\n\r\nconst classInvoker: Invoker = {\r\n invoke(container, Type: DependencyCtor, deps) {\r\n const instances = deps.map((dep) => container.get(dep));\r\n return Reflect.construct(Type, instances);\r\n },\r\n invokeWithDynamicDependencies\r\n};\r\n\r\nfunction getDependencies(f) {\r\n if (!f.hasOwnProperty('inject')) {\r\n return [];\r\n }\r\n\r\n if (typeof f.inject === 'function') {\r\n return f.inject();\r\n }\r\n\r\n return f.inject;\r\n}\r\n\r\n/**\r\n * A lightweight, extensible dependency injection container.\r\n */\r\nexport class Container {\r\n /**\r\n * The global root Container instance. Available if makeGlobal() has been\r\n * called. Aurelia Framework calls makeGlobal().\r\n */\r\n public static instance: Container;\r\n\r\n /**\r\n * The parent container in the DI hierarchy.\r\n */\r\n public parent: Container | null;\r\n\r\n /**\r\n * The root container in the DI hierarchy.\r\n */\r\n public root: Container;\r\n\r\n /** @internal */\r\n public _configuration: ContainerConfiguration;\r\n\r\n /** @internal */\r\n public _onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n /** @internal */\r\n public _handlers: Map;\r\n\r\n /** @internal */\r\n public _resolvers: Map;\r\n\r\n /**\r\n * Creates an instance of Container.\r\n * @param configuration Provides some configuration for the new Container instance.\r\n */\r\n constructor(configuration?: ContainerConfiguration) {\r\n if (configuration === undefined) {\r\n configuration = {};\r\n }\r\n\r\n this._configuration = configuration;\r\n this._onHandlerCreated = configuration.onHandlerCreated!;\r\n this._handlers =\r\n configuration.handlers || (configuration.handlers = new Map());\r\n this._resolvers = new Map();\r\n this.root = this;\r\n this.parent = null;\r\n }\r\n\r\n /**\r\n * Makes this container instance globally reachable through Container.instance.\r\n */\r\n public makeGlobal(): Container {\r\n Container.instance = this;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets an invocation handler creation callback that will be called when new\r\n * InvocationsHandlers are created (called once per Function).\r\n * @param onHandlerCreated The callback to be called when an\r\n * InvocationsHandler is created.\r\n */\r\n public setHandlerCreatedCallback<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler\r\n ) {\r\n this._onHandlerCreated = onHandlerCreated;\r\n this._configuration.onHandlerCreated = onHandlerCreated;\r\n }\r\n\r\n /**\r\n * Registers an existing object instance with the container.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param instance The instance that will be resolved when the key is matched.\r\n * This defaults to the key value when instance is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerInstance = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n instance?: TImpl): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(0, instance === undefined ? key : instance)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container always\r\n * returns the same instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.singleton, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container returns a\r\n * new instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(2, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param handler The resolution function to use when the dependency is\r\n * needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerHandler = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n handler: (container?: Container, key?: PrimitiveOrDependencyCtor, resolver?: Resolver) => any\r\n ): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.function, handler)\r\n );\r\n }\r\n\r\n /**\r\n * Registers an additional key that serves as an alias to the original DI key.\r\n * @param originalKey The key that originally identified the dependency; usually a constructor function.\r\n * @param aliasKey An alternate key which can also be used to resolve the same dependency as the original.\r\n * @return The resolver that was registered.\r\n */\r\n public registerAlias = Impl, TArgs extends Args = Args>(\r\n originalKey: PrimitiveOrDependencyCtor,\r\n aliasKey: PrimitiveOrDependencyCtor): Resolver {\r\n return this.registerResolver(\r\n aliasKey,\r\n new StrategyResolver(5, originalKey)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param resolver The resolver to use when the dependency is needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n resolver: Resolver\r\n ): Resolver {\r\n validateKey(key);\r\n\r\n const allResolvers = this._resolvers;\r\n const result = allResolvers.get(key);\r\n\r\n if (result === undefined) {\r\n allResolvers.set(key, resolver);\r\n } else if (result.strategy === 4) {\r\n result.state.push(resolver);\r\n } else {\r\n allResolvers.set(key, new StrategyResolver(4, [result, resolver]));\r\n }\r\n\r\n return resolver;\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) by inspecting its registration\r\n * annotations. If none are found, then the default singleton registration is\r\n * used.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n */\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n fn = fn === undefined ? key as DependencyCtor : fn;\r\n\r\n if (typeof fn === 'function') {\r\n const registration = metadata.get(metadata.registration, fn);\r\n\r\n if (registration === undefined) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn));\r\n }\r\n\r\n return registration.registerResolver(this, key, fn);\r\n }\r\n\r\n return this.registerResolver(key, new StrategyResolver(0, fn));\r\n }\r\n\r\n /**\r\n * Registers an array of types (constructor functions) by inspecting their\r\n * registration annotations. If none are found, then the default singleton\r\n * registration is used.\r\n * @param fns The constructor function to use when the dependency needs to be instantiated.\r\n */\r\n public autoRegisterAll(fns: DependencyCtor[]): void {\r\n let i = fns.length;\r\n while (i--) {\r\n this.autoRegister(fns[i]);\r\n }\r\n }\r\n\r\n /**\r\n * Unregisters based on key.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n */\r\n public unregister(key: any): void {\r\n this._resolvers.delete(key);\r\n }\r\n\r\n /**\r\n * Inspects the container to determine if a particular key has been registred.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @param checkParent Indicates whether or not to check the parent container hierarchy.\r\n * @return Returns true if the key has been registred; false otherwise.\r\n */\r\n public hasResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, checkParent: boolean = false): boolean {\r\n validateKey(key);\r\n\r\n return (\r\n this._resolvers.has(key) ||\r\n (checkParent &&\r\n this.parent !== null &&\r\n this.parent.hasResolver(key, checkParent))\r\n );\r\n }\r\n\r\n /**\r\n * Gets the resolver for the particular key, if it has been registered.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @return Returns the resolver, if registred, otherwise undefined.\r\n */\r\n public getResolver<\r\n TStrategyKey extends keyof StrategyState,\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n >(\r\n key: PrimitiveOrDependencyCtorOrFunctor\r\n ): StrategyResolver {\r\n return this._resolvers.get(key);\r\n }\r\n\r\n /**\r\n * Resolves a single instance based on the provided key.\r\n * @param key The key that identifies the object to resolve.\r\n * @return Returns the resolved instance.\r\n */\r\n public get | Lazy | Factory | Optional | Parent | All>(\r\n key: TResolver): ResolvedValue;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: typeof Container): Container;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor | typeof Container): ImplOrAny | Container {\r\n validateKey(key);\r\n\r\n if (key === Container) {\r\n return this;\r\n }\r\n\r\n if (resolverDecorates(key)) {\r\n return key.get(this, key);\r\n }\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key as DependencyCtor).get(this, key);\r\n }\r\n\r\n const registration = metadata.get(metadata.registration, key);\r\n\r\n if (registration === undefined) {\r\n return this.parent._get(key);\r\n }\r\n\r\n return registration.registerResolver(\r\n this, key, key as DependencyCtorOrFunctor).get(this, key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n public _get(key) {\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n\r\n return this.parent._get(key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n /**\r\n * Resolves all instance registered under the provided key.\r\n * @param key The key that identifies the objects to resolve.\r\n * @return Returns an array of the resolved instances.\r\n */\r\n public getAll = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny[] {\r\n validateKey(key);\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return _emptyParameters;\r\n }\r\n\r\n return this.parent.getAll(key);\r\n }\r\n\r\n if (resolver.strategy === 4) {\r\n const state = resolver.state;\r\n let i = state.length;\r\n const results = new Array(i);\r\n\r\n while (i--) {\r\n results[i] = state[i].get(this, key);\r\n }\r\n\r\n return results;\r\n }\r\n\r\n return [resolver.get(this, key)];\r\n }\r\n\r\n /**\r\n * Creates a new dependency injection container whose parent is the current container.\r\n * @return Returns a new container instance parented to this.\r\n */\r\n public createChild(): Container {\r\n const child = new Container(this._configuration);\r\n child.root = this.root;\r\n child.parent = this;\r\n return child;\r\n }\r\n\r\n /**\r\n * Invokes a function, recursively resolving its dependencies.\r\n * @param fn The function to invoke with the auto-resolved dependencies.\r\n * @param dynamicDependencies Additional function dependencies to use during invocation.\r\n * @return Returns the instance resulting from calling the function.\r\n */\r\n public invoke = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor,\r\n dynamicDependencies?: TArgs[number][]\r\n ): ImplOrAny {\r\n try {\r\n let handler = this._handlers.get(fn);\r\n\r\n if (handler === undefined) {\r\n handler = this._createInvocationHandler(fn);\r\n this._handlers.set(fn, handler);\r\n }\r\n\r\n return handler.invoke(this, dynamicDependencies);\r\n } catch (e) {\r\n // @ts-expect-error AggregateError returns an Error in its type hence it fails (new ...) but it's fine\r\n throw new AggregateError(\r\n `Error invoking ${fn.name}. Check the inner error for details.`,\r\n e as Error | undefined,\r\n true\r\n );\r\n }\r\n }\r\n\r\n public _createInvocationHandler\r\n = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor & { inject?: any; }\r\n ): InvocationHandler {\r\n let dependencies;\r\n\r\n if (fn.inject === undefined) {\r\n dependencies =\r\n metadata.getOwn(metadata.paramTypes, fn) || _emptyParameters;\r\n } else {\r\n dependencies = [];\r\n let ctor = fn;\r\n while (typeof ctor === 'function') {\r\n dependencies.push(...getDependencies(ctor));\r\n ctor = Object.getPrototypeOf(ctor);\r\n }\r\n }\r\n\r\n const invoker = metadata.getOwn(metadata.invoker, fn) || classInvoker;\r\n\r\n const handler = new InvocationHandler(fn, invoker, dependencies);\r\n return this._onHandlerCreated !== undefined\r\n ? this._onHandlerCreated(handler)\r\n : handler;\r\n }\r\n}\r\n\r\nexport type ResolvedValue =\r\n T extends { new (...args: any[]): infer R }\r\n ? R\r\n : T extends Factory\r\n ? (...args: unknown[]) => R\r\n : T extends Lazy\r\n ? () => R\r\n : T extends NewInstance\r\n ? R\r\n : T extends Optional\r\n ? R | null\r\n : T extends All\r\n ? R[]\r\n : T extends Parent\r\n ? R | null\r\n : T extends [infer T1, ...infer T2]\r\n ? [ResolvedValue, ...ResolvedValue]\r\n : T;\r\n\r\n/**\r\n * Resolve a key, or list of keys based on the current container.\r\n * \r\n * @example\r\n * ```ts\r\n * import { resolve } from 'aurelia-framework';\r\n * // or\r\n * // import { Container, resolve } from 'aurelia-dependency-injection';\r\n * \r\n * class MyCustomElement {\r\n * someService = resolve(MyService);\r\n * }\r\n * ```\r\n */\r\nexport function resolve(key: K): ResolvedValue;\r\nexport function resolve(...keys: K): ResolvedValue\r\nexport function resolve(...keys: K) {\r\n if (currentContainer == null) {\r\n throw new Error(`There is not a currently active container to resolve \"${String(keys)}\". Are you trying to \"new SomeClass(...)\" that has a resolve(...) call?`);\r\n }\r\n \r\n return keys.length === 1\r\n ? currentContainer.get(keys[0])\r\n : keys.map(containerGetKey, currentContainer);\r\n}\r\n\r\nfunction containerGetKey(this: Container, key: any) {\r\n return this.get(key);\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { DependencyCtorOrFunctor, ImplOrAny, Impl, Args, DependencyCtor, DependencyFunctor } from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom Invoker for the decorated item.\r\n */\r\nexport function invoker, TArgs extends Args>(\r\n value: Invoker\r\n): (target: DependencyCtor) => void {\r\n return target => {\r\n metadata.define(metadata.invoker, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies that the decorated item should be called as a factory\r\n * function, rather than a constructor.\r\n */\r\nexport function invokeAsFactory, TArgs extends Args>(\r\n potentialTarget?: DependencyCtor\r\n): void | ((target: DependencyCtor) => void) {\r\n const deco = (target: DependencyCtor) => {\r\n metadata.define(metadata.invoker, FactoryInvoker.instance, target);\r\n };\r\n\r\n return potentialTarget ? deco(potentialTarget) : deco;\r\n}\r\n\r\n/**\r\n * A strategy for invoking a function, resulting in an object instance.\r\n */\r\nexport interface Invoker, TArgs extends Args> {\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during\r\n * invocation.\r\n * @return The result of the function invocation.\r\n */\r\n invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny;\r\n}\r\n\r\n/**\r\n * An Invoker that is used to invoke a factory method.\r\n */\r\nexport class FactoryInvoker<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > implements Invoker {\r\n /**\r\n * The singleton instance of the FactoryInvoker.\r\n */\r\n public static instance: FactoryInvoker;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny {\r\n let i = dependencies.length;\r\n const args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(dependencies[i]);\r\n }\r\n\r\n return ((fn as DependencyFunctor).apply(undefined, args as TArgs)) as ImplOrAny;\r\n }\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(staticDependencies[i]);\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return (fn as DependencyFunctor).apply(undefined, args as TArgs) as ImplOrAny;\r\n }\r\n}\r\n\r\nFactoryInvoker.instance = new FactoryInvoker();\r\n","import './internal';\r\nimport { Resolver } from './resolvers';\r\nimport { Container } from './container';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtor,\r\n Impl,\r\n Args,\r\n DependencyCtor\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom registration strategy for the decorated\r\n * class/function.\r\n */\r\nexport function registration, TArgs extends Args>(\r\n value: Registration) {\r\n return (target: DependencyCtor) => {\r\n metadata.define(metadata.registration, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"transient\"\r\n * lifetime.\r\n */\r\nexport function transient, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor) {\r\n return registration(new TransientRegistration(key));\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"singleton\"\r\n * lifetime.\r\n */\r\nexport function singleton(registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor, registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean, registerInChild: boolean = false) {\r\n return registration(\r\n new SingletonRegistration(keyOrRegisterInChild, registerInChild)\r\n );\r\n}\r\n\r\n/**\r\n * Customizes how a particular function is resolved by the Container.\r\n */\r\nexport interface Registration<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args> {\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver;\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * transients with the container.\r\n */\r\nexport class TransientRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of TransientRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(key?: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const existingResolver = container.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? container.registerTransient(\r\n (this._key || key) as string,\r\n fn as DependencyCtorOrFunctor)\r\n : existingResolver;\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * singletons with the container.\r\n */\r\nexport class SingletonRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _registerInChild: boolean;\r\n\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of SingletonRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean,\r\n registerInChild: boolean = false) {\r\n if (typeof keyOrRegisterInChild === 'boolean') {\r\n this._registerInChild = keyOrRegisterInChild;\r\n } else {\r\n this._key = keyOrRegisterInChild;\r\n this._registerInChild = registerInChild;\r\n }\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const targetContainer = this._registerInChild ? container : container.root;\r\n const existingResolver = targetContainer.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? targetContainer.registerSingleton(this._key || key, fn)\r\n : existingResolver;\r\n }\r\n}\r\n"],"names":["metadata","protocol","Strategy","AggregateError"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAsCA;AACO,SAAS,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;AAC1D,IAAI,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;AACjI,IAAI,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AACnI,SAAS,KAAK,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CA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C3E,QAAA,IAAM,gBAAgB,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC;QACvE,OAAO,gBAAgB,KAAK,SAAS;AACnC,cAAE,eAAe,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,EAAE,EAAE,CAAC;cACvD,gBAAgB,CAAC;KACtB,CAAA;IACH,OAAC,qBAAA,CAAA;AAAD,CAAC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]} \ No newline at end of file +{"version":3,"file":"aurelia-dependency-injection.js","sources":["../../node_modules/tslib/tslib.es6.js","../../../src/injection.ts","../../../src/resolvers.ts","../../../src/container.ts","../../../src/invokers.ts","../../../src/registrations.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","import { metadata } from 'aurelia-metadata';\r\nimport { _emptyParameters } from './container';\r\nimport { Args, Impl, DependencyCtor } from './types';\r\n\r\n// tslint:disable-next-line:ban-types\r\nexport type Injectable = Function & { inject?: any[] | (() => any[]) };\r\n\r\nfunction isInjectable(potentialTarget: any): potentialTarget is Injectable {\r\n return !!potentialTarget;\r\n}\r\n\r\n/**\r\n * Decorator: Directs the TypeScript transpiler to write-out type metadata for\r\n * the decorated class.\r\n */\r\nexport function autoinject(\r\n potentialTarget?: TPotential\r\n): TPotential extends Injectable ? void : (target: Injectable) => void {\r\n const deco = (target: Injectable): void => {\r\n if (!target.hasOwnProperty('inject')) {\r\n target.inject = (\r\n (metadata.getOwn(metadata.paramTypes, target) as any[]) ||\r\n _emptyParameters\r\n ).slice();\r\n if (target.inject && target.inject.length > 0) {\r\n // TypeScript 3.0 metadata for \"...rest\" gives type \"Object\"\r\n // if last parameter is \"Object\", assume it's a ...rest and remove that\r\n // metadata.\r\n if (target.inject[target.inject.length - 1] === Object) {\r\n target.inject.splice(-1, 1);\r\n }\r\n }\r\n }\r\n };\r\n if (isInjectable(potentialTarget)) {\r\n return deco(potentialTarget) as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n }\r\n return deco as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n}\r\n/**\r\n * Decorator: Specifies the dependencies that should be injected by the DI Container into the decorated class/function.\r\n */\r\nexport function inject<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(...rest: TArgs[number][]): any {\r\n return (\r\n target: DependencyCtor & { inject: any },\r\n _key: any,\r\n descriptor: any) => {\r\n // handle when used as a constructor parameter decorator\r\n if (typeof descriptor === 'number') {\r\n autoinject(target);\r\n if (rest.length === 1) {\r\n target.inject[descriptor] = rest[0];\r\n }\r\n return;\r\n }\r\n // if it's true then we injecting rest into function and not Class constructor\r\n if (descriptor) {\r\n const fn = descriptor.value;\r\n fn.inject = rest;\r\n } else {\r\n target.inject = rest;\r\n }\r\n };\r\n}\r\n","import { protocol } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { autoinject } from './injection';\r\nimport type {\r\n PrimitiveOrDependencyCtor,\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n DependencyCtor,\r\n DependencyFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Indicates that the decorated class/object is a custom resolver.\r\n */\r\nexport const resolver: {\r\n decorates?: (key: any) => key is { get(container: Container, key: any): any };\r\n} & (() => any) = ((protocol as unknown) as { create(...args: any[]): any }).create(\r\n 'aurelia:resolver',\r\n (target): string | boolean => {\r\n if (!(typeof target.get === 'function')) {\r\n return 'Resolvers must implement: get(container: Container, key: any): any';\r\n }\r\n\r\n return true;\r\n }\r\n);\r\n\r\n/**\r\n * Used to allow functions/classes to specify custom dependency resolution logic.\r\n */\r\nexport interface Resolver {\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n get(container: Container, key: any): any;\r\n}\r\n\r\nexport enum Strategy {\r\n instance = 0,\r\n singleton = 1,\r\n transient = 2,\r\n function = 3,\r\n array = 4,\r\n alias = 5\r\n}\r\nexport type IStrategy = 1 | 2 | 3 | 4 | 5;\r\n\r\nexport type StrategyFunctor<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > = (\r\n container?: Container,\r\n ctor?: PrimitiveOrDependencyCtorOrFunctor,\r\n strategyResolver?: any\r\n ) => TImpl;\r\n\r\nexport interface StrategyState<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > {\r\n [Strategy.instance]: TImpl;\r\n [Strategy.singleton]: DependencyCtorOrFunctor;\r\n [Strategy.transient]: DependencyCtorOrFunctor;\r\n [Strategy.function]: StrategyFunctor;\r\n /**\r\n * For typings purposes, this is done as ({ get: StrategyFunctor } | TImpl)[]\r\n * But it should be understood, and used as [{ get: StrategyFunctor }, ...TImp[]]\r\n */\r\n [Strategy.array]: ({\r\n get: (\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor\r\n ) => TImpl\r\n } | TImpl)[];\r\n [Strategy.alias]: any;\r\n}\r\n\r\nfunction isStrategy<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TKey extends keyof StrategyState\r\n>(\r\n actual: Strategy,\r\n expected: TKey,\r\n state):\r\n state is StrategyState[TKey] {\r\n return actual === expected;\r\n}\r\n/**\r\n * Used to resolve instances, singletons, transients, aliases\r\n */\r\n@resolver()\r\nexport class StrategyResolver<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TStrategyKey extends keyof StrategyState> {\r\n\r\n public strategy: keyof StrategyState;\r\n public state: StrategyState[keyof StrategyState];\r\n\r\n /**\r\n * Creates an instance of the StrategyResolver class.\r\n * @param strategy The type of resolution strategy.\r\n * @param state The state associated with the resolution strategy.\r\n */\r\n constructor(strategy: TStrategyKey, state: StrategyState[TStrategyKey]) {\r\n this.strategy = strategy;\r\n this.state = state;\r\n }\r\n\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n public get(container: Container, key: PrimitiveOrDependencyCtor) {\r\n if (isStrategy(this.strategy, Strategy.instance, this.state)) {\r\n return this.state;\r\n }\r\n if (isStrategy(this.strategy, Strategy.singleton, this.state)) {\r\n const singleton = container.invoke(this.state);\r\n this.state = singleton;\r\n this.strategy = 0;\r\n return singleton;\r\n }\r\n if (isStrategy(this.strategy, Strategy.transient, this.state)) {\r\n return container.invoke(this.state);\r\n }\r\n if (isStrategy(this.strategy, Strategy.function, this.state)) {\r\n return this.state(container, key, this);\r\n }\r\n if (isStrategy(this.strategy, Strategy.array, this.state)) {\r\n return (this.state[0] as { get: StrategyFunctor }).get(container, key);\r\n }\r\n if (isStrategy(this.strategy, Strategy.alias, this.state)) {\r\n return container.get(this.state) as TImpl;\r\n }\r\n throw new Error('Invalid strategy: ' + this.strategy);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify lazy resolution logic.\r\n */\r\n@resolver()\r\nexport class Lazy = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'lazy';\r\n\r\n /**\r\n * Creates an instance of the Lazy class.\r\n * @param key The key to lazily resolve.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to lazily resolve the dependency into a lazy locator\r\n * function.\r\n * @param container The container to resolve from.\r\n * @return Returns a function which can be invoked at a later time to obtain\r\n * the actual dependency.\r\n */\r\n public get(container: Container): () => ImplOrAny {\r\n return () => container.get(this._key);\r\n }\r\n\r\n /**\r\n * Creates a Lazy Resolver for the supplied key.\r\n * @param key The key to lazily resolve.\r\n * @return Returns an instance of Lazy for the key.\r\n */\r\n public static of<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ) {\r\n return new Lazy(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify resolution of all matches to a key.\r\n */\r\n@resolver()\r\nexport class All = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'all';\r\n\r\n /**\r\n * Creates an instance of the All class.\r\n * @param key The key to lazily resolve all matches for.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to resolve all matching dependencies as an array of\r\n * instances.\r\n * @param container The container to resolve from.\r\n * @return Returns an array of all matching instances.\r\n */\r\n public get(container: Container): TImpl[] {\r\n return container.getAll(this._key);\r\n }\r\n\r\n /**\r\n * Creates an All Resolver for the supplied key.\r\n * @param key The key to resolve all instances for.\r\n * @return Returns an instance of All for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): All {\r\n return new All(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify an optional dependency, which will\r\n * be resolved only if already registred with the container.\r\n */\r\n@resolver()\r\nexport class Optional = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /** @internal */\r\n public _checkParent: boolean;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'optional';\r\n\r\n /**\r\n * Creates an instance of the Optional class.\r\n * @param key The key to optionally resolve for.\r\n * @param checkParent Indicates whether or not the parent container hierarchy\r\n * should be checked.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor, checkParent: boolean = true) {\r\n this._key = key;\r\n this._checkParent = checkParent;\r\n }\r\n\r\n /**\r\n * Called by the container to provide optional resolution of the key.\r\n * @param container The container to resolve from.\r\n * @return Returns the instance if found; otherwise null.\r\n */\r\n public get(container: Container): TImpl | null {\r\n if (container.hasResolver(this._key, this._checkParent)) {\r\n return container.get(this._key);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Creates an Optional Resolver for the supplied key.\r\n * @param key The key to optionally resolve for.\r\n * @param [checkParent=true] Indicates whether or not the parent container\r\n * hierarchy should be checked.\r\n * @return Returns an instance of Optional for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n checkParent: boolean = true): Optional {\r\n return new Optional(key, checkParent);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject the dependency from the parent container instead of the current\r\n * one.\r\n */\r\n@resolver()\r\nexport class Parent = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'parent';\r\n\r\n /**\r\n * Creates an instance of the Parent class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to load the dependency from the parent container\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container): TImpl | null {\r\n return container.parent ? container.parent.get(this._key) : null;\r\n }\r\n\r\n /**\r\n * Creates a Parent Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Parent for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): Parent {\r\n return new Parent(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow injecting dependencies but also passing data to the constructor.\r\n */\r\n@resolver()\r\nexport class Factory = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtorOrFunctor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'factory';\r\n\r\n /**\r\n * Creates an instance of the Factory class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to pass the dependencies to the constructor.\r\n * @param container The container to invoke the constructor with dependencies\r\n * and other parameters.\r\n * @return Returns a function that can be invoked to resolve dependencies\r\n * later, and the rest of the parameters.\r\n */\r\n public get(container: Container): DependencyFunctor {\r\n let fn = this._key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === Strategy.function) {\r\n fn = resolver.state;\r\n }\r\n\r\n return (...rest) => container.invoke(fn as DependencyCtorOrFunctor, rest);\r\n }\r\n\r\n /**\r\n * Creates a Factory Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Factory for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: DependencyCtor\r\n ): Factory {\r\n return new Factory(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject a new instance of a dependency, without regard for existing\r\n * instances in the container. Instances can optionally be registered in the\r\n * container\r\n * under a different key by supplying a key using the `as` method.\r\n */\r\n@resolver()\r\nexport class NewInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public key: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public asKey: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public dynamicDependencies: TArgs[number][];\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'newInstance';\r\n\r\n /**\r\n * Creates an instance of the NewInstance class.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor, ...dynamicDependencies: TArgs[number][]) {\r\n this.key = key;\r\n this.asKey = key;\r\n this.dynamicDependencies = dynamicDependencies;\r\n }\r\n\r\n /**\r\n * Called by the container to instantiate the dependency and potentially\r\n * register\r\n * as another key if the `as` method was used.\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container) {\r\n const dynamicDependencies =\r\n this.dynamicDependencies.length > 0\r\n ? this.dynamicDependencies.map(dependency =>\r\n dependency['protocol:aurelia:resolver']\r\n ? dependency.get(container)\r\n : container.get(dependency)\r\n )\r\n : undefined;\r\n\r\n let fn = this.key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === 3) {\r\n fn = resolver.state;\r\n }\r\n\r\n const instance = container.invoke(fn as DependencyCtorOrFunctor, dynamicDependencies);\r\n container.registerInstance(this.asKey, instance);\r\n return instance;\r\n }\r\n\r\n /**\r\n * Instructs the NewInstance resolver to register the resolved instance using\r\n * the supplied key.\r\n * @param key The key to register the instance with.\r\n * @return Returns the NewInstance resolver.\r\n */\r\n public as(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this.asKey = key;\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates an NewInstance Resolver for the supplied key.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n * @return Returns an instance of NewInstance for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtorOrFunctor,\r\n ...dynamicDependencies: TArgs[number][]): NewInstance {\r\n return new NewInstance(key, ...dynamicDependencies);\r\n }\r\n}\r\n\r\n/**\r\n * Used by parameter decorators to call autoinject for the target and retrieve\r\n * the target's inject property.\r\n * @param target The target class.\r\n * @return Returns the target's own inject property.\r\n */\r\nexport function getDecoratorDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] }\r\n ) {\r\n autoinject(target);\r\n\r\n return target.inject;\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should be lazy loaded\r\n */\r\nexport function lazy<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: { new (...args: TArgs): TBase | TImpl },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Lazy.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should load all instances of the given\r\n * key.\r\n */\r\nexport function all<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = All.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as optional\r\n */\r\nexport function optional<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n checkParentOrTarget: boolean = true) {\r\n const deco = (checkParent: boolean) => {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Optional.of(inject[index], checkParent);\r\n };\r\n };\r\n if (typeof checkParentOrTarget === 'boolean') {\r\n return deco(checkParentOrTarget);\r\n }\r\n return deco(true);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to look at the parent container for\r\n * resolution\r\n */\r\nexport function parent<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Parent.of(inject[index]);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to create a factory method, that can\r\n * accept optional arguments\r\n */\r\nexport function factory<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Factory.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as a new instance. Instances can optionally be registered in the container\r\n * under a different key and/or use dynamic dependencies\r\n */\r\nexport function newInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n asKeyOrTarget?: PrimitiveOrDependencyCtor & { inject?: TArgs[number][] },\r\n ...dynamicDependencies: TArgs[number][]\r\n) {\r\n const deco = (asKey?: typeof asKeyOrTarget) => {\r\n return (\r\n target: { new (...args: any[]): any },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = NewInstance.of(inject[index], ...dynamicDependencies);\r\n if (!!asKey) {\r\n inject[index].as(asKey);\r\n }\r\n };\r\n };\r\n if (arguments.length >= 1) {\r\n return deco(asKeyOrTarget);\r\n }\r\n return deco();\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { AggregateError } from 'aurelia-pal';\r\nimport { resolver, StrategyResolver, Resolver, Strategy, StrategyState, Factory, NewInstance, Lazy, Optional, All, Parent } from './resolvers';\r\nimport { Invoker } from './invokers';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n DependencyCtor,\r\n PrimitiveOrDependencyCtor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args,\r\n Primitive\r\n} from './types';\r\n\r\nlet currentContainer: Container | null = null;\r\n\r\nfunction validateKey(key: any) {\r\n if (key === null || key === undefined) {\r\n throw new Error(\r\n 'key/value cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport const _emptyParameters = Object.freeze([]) as [];\r\n\r\nmetadata.registration = 'aurelia:registration';\r\nmetadata.invoker = 'aurelia:invoker';\r\n\r\nconst resolverDecorates = resolver.decorates!;\r\n\r\n/**\r\n * Stores the information needed to invoke a function.\r\n */\r\nexport class InvocationHandler<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args\r\n > {\r\n /**\r\n * The function to be invoked by this handler.\r\n */\r\n public fn: DependencyCtorOrFunctor;\r\n\r\n /**\r\n * The invoker implementation that will be used to actually invoke the function.\r\n */\r\n public invoker: Invoker;\r\n\r\n /**\r\n * The statically known dependencies of this function invocation.\r\n */\r\n public dependencies: TArgs;\r\n\r\n /**\r\n * Instantiates an InvocationDescription.\r\n * @param fn The Function described by this description object.\r\n * @param invoker The strategy for invoking the function.\r\n * @param dependencies The static dependencies of the function call.\r\n */\r\n constructor(\r\n fn: DependencyCtorOrFunctor,\r\n invoker: Invoker,\r\n dependencies: TArgs\r\n ) {\r\n this.fn = fn;\r\n this.invoker = invoker;\r\n this.dependencies = dependencies;\r\n }\r\n\r\n /**\r\n * Invokes the function.\r\n * @param container The calling container.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(container: Container, dynamicDependencies?: TArgs[]): TImpl {\r\n const previousContainer = currentContainer;\r\n currentContainer = container;\r\n try {\r\n return dynamicDependencies !== undefined\r\n ? this.invoker.invokeWithDynamicDependencies(\r\n container,\r\n this.fn,\r\n this.dependencies,\r\n dynamicDependencies\r\n )\r\n : this.invoker.invoke(container, this.fn, this.dependencies);\r\n } finally {\r\n currentContainer = previousContainer;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Used to configure a Container instance.\r\n */\r\nexport interface ContainerConfiguration {\r\n /**\r\n * An optional callback which will be called when any function needs an\r\n * InvocationHandler created (called once per Function).\r\n */\r\n onHandlerCreated?: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n handlers?: Map;\r\n}\r\n\r\nfunction invokeWithDynamicDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n) {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n let lookup;\r\n\r\n while (i--) {\r\n lookup = staticDependencies[i];\r\n\r\n if (lookup === null || lookup === undefined) {\r\n throw new Error(\r\n 'Constructor Parameter with index ' +\r\n i +\r\n ' cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n } else {\r\n args[i] = container.get(lookup);\r\n }\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return Reflect.construct(fn, args);\r\n}\r\n\r\nconst classInvoker: Invoker = {\r\n invoke(container, Type: DependencyCtor, deps) {\r\n const instances = deps.map((dep) => container.get(dep));\r\n return Reflect.construct(Type, instances);\r\n },\r\n invokeWithDynamicDependencies\r\n};\r\n\r\nfunction getDependencies(f) {\r\n if (!f.hasOwnProperty('inject')) {\r\n return [];\r\n }\r\n\r\n if (typeof f.inject === 'function') {\r\n return f.inject();\r\n }\r\n\r\n return f.inject;\r\n}\r\n\r\n/**\r\n * A lightweight, extensible dependency injection container.\r\n */\r\nexport class Container {\r\n /**\r\n * The global root Container instance. Available if makeGlobal() has been\r\n * called. Aurelia Framework calls makeGlobal().\r\n */\r\n public static instance: Container;\r\n\r\n /**\r\n * The parent container in the DI hierarchy.\r\n */\r\n public parent: Container | null;\r\n\r\n /**\r\n * The root container in the DI hierarchy.\r\n */\r\n public root: Container;\r\n\r\n /** @internal */\r\n public _configuration: ContainerConfiguration;\r\n\r\n /** @internal */\r\n public _onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n /** @internal */\r\n public _handlers: Map;\r\n\r\n /** @internal */\r\n public _resolvers: Map;\r\n\r\n /**\r\n * Creates an instance of Container.\r\n * @param configuration Provides some configuration for the new Container instance.\r\n */\r\n constructor(configuration?: ContainerConfiguration) {\r\n if (configuration === undefined) {\r\n configuration = {};\r\n }\r\n\r\n this._configuration = configuration;\r\n this._onHandlerCreated = configuration.onHandlerCreated!;\r\n this._handlers =\r\n configuration.handlers || (configuration.handlers = new Map());\r\n this._resolvers = new Map();\r\n this.root = this;\r\n this.parent = null;\r\n }\r\n\r\n /**\r\n * Makes this container instance globally reachable through Container.instance.\r\n */\r\n public makeGlobal(): Container {\r\n Container.instance = this;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets an invocation handler creation callback that will be called when new\r\n * InvocationsHandlers are created (called once per Function).\r\n * @param onHandlerCreated The callback to be called when an\r\n * InvocationsHandler is created.\r\n */\r\n public setHandlerCreatedCallback<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler\r\n ) {\r\n this._onHandlerCreated = onHandlerCreated;\r\n this._configuration.onHandlerCreated = onHandlerCreated;\r\n }\r\n\r\n /**\r\n * Registers an existing object instance with the container.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param instance The instance that will be resolved when the key is matched.\r\n * This defaults to the key value when instance is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerInstance = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n instance?: TImpl): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(0, instance === undefined ? key : instance)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container always\r\n * returns the same instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.singleton, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container returns a\r\n * new instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(2, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param handler The resolution function to use when the dependency is\r\n * needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerHandler = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n handler: (container?: Container, key?: PrimitiveOrDependencyCtor, resolver?: Resolver) => any\r\n ): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.function, handler)\r\n );\r\n }\r\n\r\n /**\r\n * Registers an additional key that serves as an alias to the original DI key.\r\n * @param originalKey The key that originally identified the dependency; usually a constructor function.\r\n * @param aliasKey An alternate key which can also be used to resolve the same dependency as the original.\r\n * @return The resolver that was registered.\r\n */\r\n public registerAlias = Impl, TArgs extends Args = Args>(\r\n originalKey: PrimitiveOrDependencyCtor,\r\n aliasKey: PrimitiveOrDependencyCtor): Resolver {\r\n return this.registerResolver(\r\n aliasKey,\r\n new StrategyResolver(5, originalKey)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param resolver The resolver to use when the dependency is needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n resolver: Resolver\r\n ): Resolver {\r\n validateKey(key);\r\n\r\n const allResolvers = this._resolvers;\r\n const result = allResolvers.get(key);\r\n\r\n if (result === undefined) {\r\n allResolvers.set(key, resolver);\r\n } else if (result.strategy === 4) {\r\n result.state.push(resolver);\r\n } else {\r\n allResolvers.set(key, new StrategyResolver(4, [result, resolver]));\r\n }\r\n\r\n return resolver;\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) by inspecting its registration\r\n * annotations. If none are found, then the default singleton registration is\r\n * used.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n */\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n fn = fn === undefined ? key as DependencyCtor : fn;\r\n\r\n if (typeof fn === 'function') {\r\n const registration = metadata.get(metadata.registration, fn);\r\n\r\n if (registration === undefined) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn));\r\n }\r\n\r\n return registration.registerResolver(this, key, fn);\r\n }\r\n\r\n return this.registerResolver(key, new StrategyResolver(0, fn));\r\n }\r\n\r\n /**\r\n * Registers an array of types (constructor functions) by inspecting their\r\n * registration annotations. If none are found, then the default singleton\r\n * registration is used.\r\n * @param fns The constructor function to use when the dependency needs to be instantiated.\r\n */\r\n public autoRegisterAll(fns: DependencyCtor[]): void {\r\n let i = fns.length;\r\n while (i--) {\r\n this.autoRegister(fns[i]);\r\n }\r\n }\r\n\r\n /**\r\n * Unregisters based on key.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n */\r\n public unregister(key: any): void {\r\n this._resolvers.delete(key);\r\n }\r\n\r\n /**\r\n * Inspects the container to determine if a particular key has been registred.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @param checkParent Indicates whether or not to check the parent container hierarchy.\r\n * @return Returns true if the key has been registred; false otherwise.\r\n */\r\n public hasResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, checkParent: boolean = false): boolean {\r\n validateKey(key);\r\n\r\n return (\r\n this._resolvers.has(key) ||\r\n (checkParent &&\r\n this.parent !== null &&\r\n this.parent.hasResolver(key, checkParent))\r\n );\r\n }\r\n\r\n /**\r\n * Gets the resolver for the particular key, if it has been registered.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @return Returns the resolver, if registred, otherwise undefined.\r\n */\r\n public getResolver<\r\n TStrategyKey extends keyof StrategyState,\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n >(\r\n key: PrimitiveOrDependencyCtorOrFunctor\r\n ): StrategyResolver {\r\n return this._resolvers.get(key);\r\n }\r\n\r\n /**\r\n * Resolves a single instance based on the provided key.\r\n * @param key The key that identifies the object to resolve.\r\n * @return Returns the resolved instance.\r\n */\r\n public get | Lazy | Factory | Optional | Parent | All>(\r\n key: TResolver): ResolvedValue;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: typeof Container): Container;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor | typeof Container): ImplOrAny | Container {\r\n validateKey(key);\r\n\r\n if (key === Container) {\r\n return this;\r\n }\r\n\r\n if (resolverDecorates(key)) {\r\n return key.get(this, key);\r\n }\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key as DependencyCtor).get(this, key);\r\n }\r\n\r\n const registration = metadata.get(metadata.registration, key);\r\n\r\n if (registration === undefined) {\r\n return this.parent._get(key);\r\n }\r\n\r\n return registration.registerResolver(\r\n this, key, key as DependencyCtorOrFunctor).get(this, key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n public _get(key) {\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n\r\n return this.parent._get(key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n /**\r\n * Resolves all instance registered under the provided key.\r\n * @param key The key that identifies the objects to resolve.\r\n * @return Returns an array of the resolved instances.\r\n */\r\n public getAll = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny[] {\r\n validateKey(key);\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return _emptyParameters;\r\n }\r\n\r\n return this.parent.getAll(key);\r\n }\r\n\r\n if (resolver.strategy === 4) {\r\n const state = resolver.state;\r\n let i = state.length;\r\n const results = new Array(i);\r\n\r\n while (i--) {\r\n results[i] = state[i].get(this, key);\r\n }\r\n\r\n return results;\r\n }\r\n\r\n return [resolver.get(this, key)];\r\n }\r\n\r\n /**\r\n * Creates a new dependency injection container whose parent is the current container.\r\n * @return Returns a new container instance parented to this.\r\n */\r\n public createChild(): Container {\r\n const child = new Container(this._configuration);\r\n child.root = this.root;\r\n child.parent = this;\r\n return child;\r\n }\r\n\r\n /**\r\n * Invokes a function, recursively resolving its dependencies.\r\n * @param fn The function to invoke with the auto-resolved dependencies.\r\n * @param dynamicDependencies Additional function dependencies to use during invocation.\r\n * @return Returns the instance resulting from calling the function.\r\n */\r\n public invoke = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor,\r\n dynamicDependencies?: TArgs[number][]\r\n ): ImplOrAny {\r\n try {\r\n let handler = this._handlers.get(fn);\r\n\r\n if (handler === undefined) {\r\n handler = this._createInvocationHandler(fn);\r\n this._handlers.set(fn, handler);\r\n }\r\n\r\n return handler.invoke(this, dynamicDependencies);\r\n } catch (e) {\r\n // @ts-expect-error AggregateError returns an Error in its type hence it fails (new ...) but it's fine\r\n throw new AggregateError(\r\n `Error invoking ${fn.name}. Check the inner error for details.`,\r\n e as Error | undefined,\r\n true\r\n );\r\n }\r\n }\r\n\r\n public _createInvocationHandler\r\n = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor & { inject?: any; }\r\n ): InvocationHandler {\r\n let dependencies;\r\n\r\n if (fn.inject === undefined) {\r\n dependencies =\r\n metadata.getOwn(metadata.paramTypes, fn) || _emptyParameters;\r\n } else {\r\n dependencies = [];\r\n let ctor = fn;\r\n while (typeof ctor === 'function') {\r\n dependencies.push(...getDependencies(ctor));\r\n ctor = Object.getPrototypeOf(ctor);\r\n }\r\n }\r\n\r\n const invoker = metadata.getOwn(metadata.invoker, fn) || classInvoker;\r\n\r\n const handler = new InvocationHandler(fn, invoker, dependencies);\r\n return this._onHandlerCreated !== undefined\r\n ? this._onHandlerCreated(handler)\r\n : handler;\r\n }\r\n}\r\n\r\nexport type ResolvedValue =\r\n T extends (new (...args: any[]) => infer R)\r\n ? R\r\n : T extends (abstract new (...args: any[]) => infer R)\r\n ? R\r\n : T extends Factory\r\n ? (...args: unknown[]) => R\r\n : T extends Lazy\r\n ? () => R\r\n : T extends NewInstance\r\n ? R\r\n : T extends Optional\r\n ? R | null\r\n : T extends All\r\n ? R[]\r\n : T extends Parent\r\n ? R | null\r\n : T extends [infer T1, ...infer T2]\r\n ? [ResolvedValue, ...ResolvedValue]\r\n : T;\r\n\r\n/**\r\n * Resolve a key, or list of keys based on the current container.\r\n * \r\n * @example\r\n * ```ts\r\n * import { resolve } from 'aurelia-framework';\r\n * // or\r\n * // import { Container, resolve } from 'aurelia-dependency-injection';\r\n * \r\n * class MyCustomElement {\r\n * someService = resolve(MyService);\r\n * }\r\n * ```\r\n */\r\nexport function resolve(key: K): ResolvedValue;\r\nexport function resolve(...keys: K): ResolvedValue\r\nexport function resolve(...keys: K) {\r\n if (currentContainer == null) {\r\n throw new Error(`There is not a currently active container to resolve \"${String(keys)}\". Are you trying to \"new SomeClass(...)\" that has a resolve(...) call?`);\r\n }\r\n \r\n return keys.length === 1\r\n ? currentContainer.get(keys[0])\r\n : keys.map(containerGetKey, currentContainer);\r\n}\r\n\r\nfunction containerGetKey(this: Container, key: any) {\r\n return this.get(key);\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { DependencyCtorOrFunctor, ImplOrAny, Impl, Args, DependencyCtor, DependencyFunctor } from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom Invoker for the decorated item.\r\n */\r\nexport function invoker, TArgs extends Args>(\r\n value: Invoker\r\n): (target: DependencyCtor) => void {\r\n return target => {\r\n metadata.define(metadata.invoker, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies that the decorated item should be called as a factory\r\n * function, rather than a constructor.\r\n */\r\nexport function invokeAsFactory, TArgs extends Args>(\r\n potentialTarget?: DependencyCtor\r\n): void | ((target: DependencyCtor) => void) {\r\n const deco = (target: DependencyCtor) => {\r\n metadata.define(metadata.invoker, FactoryInvoker.instance, target);\r\n };\r\n\r\n return potentialTarget ? deco(potentialTarget) : deco;\r\n}\r\n\r\n/**\r\n * A strategy for invoking a function, resulting in an object instance.\r\n */\r\nexport interface Invoker, TArgs extends Args> {\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during\r\n * invocation.\r\n * @return The result of the function invocation.\r\n */\r\n invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny;\r\n}\r\n\r\n/**\r\n * An Invoker that is used to invoke a factory method.\r\n */\r\nexport class FactoryInvoker<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > implements Invoker {\r\n /**\r\n * The singleton instance of the FactoryInvoker.\r\n */\r\n public static instance: FactoryInvoker;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny {\r\n let i = dependencies.length;\r\n const args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(dependencies[i]);\r\n }\r\n\r\n return ((fn as DependencyFunctor).apply(undefined, args as TArgs)) as ImplOrAny;\r\n }\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(staticDependencies[i]);\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return (fn as DependencyFunctor).apply(undefined, args as TArgs) as ImplOrAny;\r\n }\r\n}\r\n\r\nFactoryInvoker.instance = new FactoryInvoker();\r\n","import './internal';\r\nimport { Resolver } from './resolvers';\r\nimport { Container } from './container';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtor,\r\n Impl,\r\n Args,\r\n DependencyCtor\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom registration strategy for the decorated\r\n * class/function.\r\n */\r\nexport function registration, TArgs extends Args>(\r\n value: Registration) {\r\n return (target: DependencyCtor) => {\r\n metadata.define(metadata.registration, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"transient\"\r\n * lifetime.\r\n */\r\nexport function transient, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor) {\r\n return registration(new TransientRegistration(key));\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"singleton\"\r\n * lifetime.\r\n */\r\nexport function singleton(registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor, registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean, registerInChild: boolean = false) {\r\n return registration(\r\n new SingletonRegistration(keyOrRegisterInChild, registerInChild)\r\n );\r\n}\r\n\r\n/**\r\n * Customizes how a particular function is resolved by the Container.\r\n */\r\nexport interface Registration<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args> {\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver;\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * transients with the container.\r\n */\r\nexport class TransientRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of TransientRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(key?: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const existingResolver = container.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? container.registerTransient(\r\n (this._key || key) as string,\r\n fn as DependencyCtorOrFunctor)\r\n : existingResolver;\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * singletons with the container.\r\n */\r\nexport class SingletonRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _registerInChild: boolean;\r\n\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of SingletonRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean,\r\n registerInChild: boolean = false) {\r\n if (typeof keyOrRegisterInChild === 'boolean') {\r\n this._registerInChild = keyOrRegisterInChild;\r\n } else {\r\n this._key = keyOrRegisterInChild;\r\n this._registerInChild = registerInChild;\r\n }\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const targetContainer = this._registerInChild ? container : container.root;\r\n const existingResolver = targetContainer.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? targetContainer.registerSingleton(this._key || key, fn)\r\n : existingResolver;\r\n }\r\n}\r\n"],"names":["metadata","protocol","Strategy","AggregateError"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAsCA;AACO,SAAS,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;AAC1D,IAAI,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,IAAI,KAAK,IAAI,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IAAA,qBAAA,IAAA,YAAA;IAYE,SACE,qBAAA,CAAA,oBAA+E,EAC/E,eAAgC,EAAA;AAAhC,QAAA,IAAA,eAAA,KAAA,KAAA,CAAA,EAAA,EAAA,eAAgC,GAAA,KAAA,CAAA,EAAA;AAChC,QAAA,IAAI,OAAO,oBAAoB,KAAK,SAAS,EAAE;AAC7C,YAAA,IAAI,CAAC,gBAAgB,GAAG,oBAAoB,CAAC;SAC9C;aAAM;AACL,YAAA,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;AACjC,YAAA,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;SACzC;KACF;AASM,IAAA,qBAAA,CAAA,SAAA,CAAA,gBAAgB,GAAvB,UACE,SAAoB,EACpB,GAAmD,EACnD,EAAgD,EAAA;AAEhD,QAAA,IAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC;AAC3E,QAAA,IAAM,gBAAgB,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC;QACvE,OAAO,gBAAgB,KAAK,SAAS;AACnC,cAAE,eAAe,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,EAAE,EAAE,CAAC;cACvD,gBAAgB,CAAC;KACtB,CAAA;IACH,OAAC,qBAAA,CAAA;AAAD,CAAC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/dist/es2015/aurelia-dependency-injection.js.map b/dist/es2015/aurelia-dependency-injection.js.map index fcc6a08..8e907e0 100644 --- a/dist/es2015/aurelia-dependency-injection.js.map +++ b/dist/es2015/aurelia-dependency-injection.js.map @@ -1 +1 @@ -{"version":3,"file":"aurelia-dependency-injection.js","sources":["../../node_modules/tslib/tslib.es6.js","../../../src/injection.ts","../../../src/resolvers.ts","../../../src/container.ts","../../../src/invokers.ts","../../../src/registrations.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","import { metadata } from 'aurelia-metadata';\r\nimport { _emptyParameters } from './container';\r\nimport { Args, Impl, DependencyCtor } from './types';\r\n\r\n// tslint:disable-next-line:ban-types\r\nexport type Injectable = Function & { inject?: any[] | (() => any[]) };\r\n\r\nfunction isInjectable(potentialTarget: any): potentialTarget is Injectable {\r\n return !!potentialTarget;\r\n}\r\n\r\n/**\r\n * Decorator: Directs the TypeScript transpiler to write-out type metadata for\r\n * the decorated class.\r\n */\r\nexport function autoinject(\r\n potentialTarget?: TPotential\r\n): TPotential extends Injectable ? void : (target: Injectable) => void {\r\n const deco = (target: Injectable): void => {\r\n if (!target.hasOwnProperty('inject')) {\r\n target.inject = (\r\n (metadata.getOwn(metadata.paramTypes, target) as any[]) ||\r\n _emptyParameters\r\n ).slice();\r\n if (target.inject && target.inject.length > 0) {\r\n // TypeScript 3.0 metadata for \"...rest\" gives type \"Object\"\r\n // if last parameter is \"Object\", assume it's a ...rest and remove that\r\n // metadata.\r\n if (target.inject[target.inject.length - 1] === Object) {\r\n target.inject.splice(-1, 1);\r\n }\r\n }\r\n }\r\n };\r\n if (isInjectable(potentialTarget)) {\r\n return deco(potentialTarget) as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n }\r\n return deco as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n}\r\n/**\r\n * Decorator: Specifies the dependencies that should be injected by the DI Container into the decorated class/function.\r\n */\r\nexport function inject<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(...rest: TArgs[number][]): any {\r\n return (\r\n target: DependencyCtor & { inject: any },\r\n _key: any,\r\n descriptor: any) => {\r\n // handle when used as a constructor parameter decorator\r\n if (typeof descriptor === 'number') {\r\n autoinject(target);\r\n if (rest.length === 1) {\r\n target.inject[descriptor] = rest[0];\r\n }\r\n return;\r\n }\r\n // if it's true then we injecting rest into function and not Class constructor\r\n if (descriptor) {\r\n const fn = descriptor.value;\r\n fn.inject = rest;\r\n } else {\r\n target.inject = rest;\r\n }\r\n };\r\n}\r\n","import { protocol } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { autoinject } from './injection';\r\nimport type {\r\n PrimitiveOrDependencyCtor,\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n DependencyCtor,\r\n DependencyFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Indicates that the decorated class/object is a custom resolver.\r\n */\r\nexport const resolver: {\r\n decorates?: (key: any) => key is { get(container: Container, key: any): any };\r\n} & (() => any) = ((protocol as unknown) as { create(...args: any[]): any }).create(\r\n 'aurelia:resolver',\r\n (target): string | boolean => {\r\n if (!(typeof target.get === 'function')) {\r\n return 'Resolvers must implement: get(container: Container, key: any): any';\r\n }\r\n\r\n return true;\r\n }\r\n);\r\n\r\n/**\r\n * Used to allow functions/classes to specify custom dependency resolution logic.\r\n */\r\nexport interface Resolver {\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n get(container: Container, key: any): any;\r\n}\r\n\r\nexport enum Strategy {\r\n instance = 0,\r\n singleton = 1,\r\n transient = 2,\r\n function = 3,\r\n array = 4,\r\n alias = 5\r\n}\r\nexport type IStrategy = 1 | 2 | 3 | 4 | 5;\r\n\r\nexport type StrategyFunctor<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > = (\r\n container?: Container,\r\n ctor?: PrimitiveOrDependencyCtorOrFunctor,\r\n strategyResolver?: any\r\n ) => TImpl;\r\n\r\nexport interface StrategyState<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > {\r\n [Strategy.instance]: TImpl;\r\n [Strategy.singleton]: DependencyCtorOrFunctor;\r\n [Strategy.transient]: DependencyCtorOrFunctor;\r\n [Strategy.function]: StrategyFunctor;\r\n /**\r\n * For typings purposes, this is done as ({ get: StrategyFunctor } | TImpl)[]\r\n * But it should be understood, and used as [{ get: StrategyFunctor }, ...TImp[]]\r\n */\r\n [Strategy.array]: ({\r\n get: (\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor\r\n ) => TImpl\r\n } | TImpl)[];\r\n [Strategy.alias]: any;\r\n}\r\n\r\nfunction isStrategy<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TKey extends keyof StrategyState\r\n>(\r\n actual: Strategy,\r\n expected: TKey,\r\n state):\r\n state is StrategyState[TKey] {\r\n return actual === expected;\r\n}\r\n/**\r\n * Used to resolve instances, singletons, transients, aliases\r\n */\r\n@resolver()\r\nexport class StrategyResolver<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TStrategyKey extends keyof StrategyState> {\r\n\r\n public strategy: keyof StrategyState;\r\n public state: StrategyState[keyof StrategyState];\r\n\r\n /**\r\n * Creates an instance of the StrategyResolver class.\r\n * @param strategy The type of resolution strategy.\r\n * @param state The state associated with the resolution strategy.\r\n */\r\n constructor(strategy: TStrategyKey, state: StrategyState[TStrategyKey]) {\r\n this.strategy = strategy;\r\n this.state = state;\r\n }\r\n\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n public get(container: Container, key: PrimitiveOrDependencyCtor) {\r\n if (isStrategy(this.strategy, Strategy.instance, this.state)) {\r\n return this.state;\r\n }\r\n if (isStrategy(this.strategy, Strategy.singleton, this.state)) {\r\n const singleton = container.invoke(this.state);\r\n this.state = singleton;\r\n this.strategy = 0;\r\n return singleton;\r\n }\r\n if (isStrategy(this.strategy, Strategy.transient, this.state)) {\r\n return container.invoke(this.state);\r\n }\r\n if (isStrategy(this.strategy, Strategy.function, this.state)) {\r\n return this.state(container, key, this);\r\n }\r\n if (isStrategy(this.strategy, Strategy.array, this.state)) {\r\n return (this.state[0] as { get: StrategyFunctor }).get(container, key);\r\n }\r\n if (isStrategy(this.strategy, Strategy.alias, this.state)) {\r\n return container.get(this.state) as TImpl;\r\n }\r\n throw new Error('Invalid strategy: ' + this.strategy);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify lazy resolution logic.\r\n */\r\n@resolver()\r\nexport class Lazy = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'lazy';\r\n\r\n /**\r\n * Creates an instance of the Lazy class.\r\n * @param key The key to lazily resolve.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to lazily resolve the dependency into a lazy locator\r\n * function.\r\n * @param container The container to resolve from.\r\n * @return Returns a function which can be invoked at a later time to obtain\r\n * the actual dependency.\r\n */\r\n public get(container: Container): () => ImplOrAny {\r\n return () => container.get(this._key);\r\n }\r\n\r\n /**\r\n * Creates a Lazy Resolver for the supplied key.\r\n * @param key The key to lazily resolve.\r\n * @return Returns an instance of Lazy for the key.\r\n */\r\n public static of<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ) {\r\n return new Lazy(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify resolution of all matches to a key.\r\n */\r\n@resolver()\r\nexport class All = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'all';\r\n\r\n /**\r\n * Creates an instance of the All class.\r\n * @param key The key to lazily resolve all matches for.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to resolve all matching dependencies as an array of\r\n * instances.\r\n * @param container The container to resolve from.\r\n * @return Returns an array of all matching instances.\r\n */\r\n public get(container: Container): TImpl[] {\r\n return container.getAll(this._key);\r\n }\r\n\r\n /**\r\n * Creates an All Resolver for the supplied key.\r\n * @param key The key to resolve all instances for.\r\n * @return Returns an instance of All for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): All {\r\n return new All(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify an optional dependency, which will\r\n * be resolved only if already registred with the container.\r\n */\r\n@resolver()\r\nexport class Optional = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /** @internal */\r\n public _checkParent: boolean;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'optional';\r\n\r\n /**\r\n * Creates an instance of the Optional class.\r\n * @param key The key to optionally resolve for.\r\n * @param checkParent Indicates whether or not the parent container hierarchy\r\n * should be checked.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor, checkParent: boolean = true) {\r\n this._key = key;\r\n this._checkParent = checkParent;\r\n }\r\n\r\n /**\r\n * Called by the container to provide optional resolution of the key.\r\n * @param container The container to resolve from.\r\n * @return Returns the instance if found; otherwise null.\r\n */\r\n public get(container: Container): TImpl | null {\r\n if (container.hasResolver(this._key, this._checkParent)) {\r\n return container.get(this._key);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Creates an Optional Resolver for the supplied key.\r\n * @param key The key to optionally resolve for.\r\n * @param [checkParent=true] Indicates whether or not the parent container\r\n * hierarchy should be checked.\r\n * @return Returns an instance of Optional for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n checkParent: boolean = true): Optional {\r\n return new Optional(key, checkParent);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject the dependency from the parent container instead of the current\r\n * one.\r\n */\r\n@resolver()\r\nexport class Parent = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'parent';\r\n\r\n /**\r\n * Creates an instance of the Parent class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to load the dependency from the parent container\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container): TImpl | null {\r\n return container.parent ? container.parent.get(this._key) : null;\r\n }\r\n\r\n /**\r\n * Creates a Parent Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Parent for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): Parent {\r\n return new Parent(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow injecting dependencies but also passing data to the constructor.\r\n */\r\n@resolver()\r\nexport class Factory = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtorOrFunctor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'factory';\r\n\r\n /**\r\n * Creates an instance of the Factory class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to pass the dependencies to the constructor.\r\n * @param container The container to invoke the constructor with dependencies\r\n * and other parameters.\r\n * @return Returns a function that can be invoked to resolve dependencies\r\n * later, and the rest of the parameters.\r\n */\r\n public get(container: Container): DependencyFunctor {\r\n let fn = this._key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === Strategy.function) {\r\n fn = resolver.state;\r\n }\r\n\r\n return (...rest) => container.invoke(fn as DependencyCtorOrFunctor, rest);\r\n }\r\n\r\n /**\r\n * Creates a Factory Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Factory for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: DependencyCtor\r\n ): Factory {\r\n return new Factory(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject a new instance of a dependency, without regard for existing\r\n * instances in the container. Instances can optionally be registered in the\r\n * container\r\n * under a different key by supplying a key using the `as` method.\r\n */\r\n@resolver()\r\nexport class NewInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public key: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public asKey: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public dynamicDependencies: TArgs[number][];\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'newInstance';\r\n\r\n /**\r\n * Creates an instance of the NewInstance class.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor, ...dynamicDependencies: TArgs[number][]) {\r\n this.key = key;\r\n this.asKey = key;\r\n this.dynamicDependencies = dynamicDependencies;\r\n }\r\n\r\n /**\r\n * Called by the container to instantiate the dependency and potentially\r\n * register\r\n * as another key if the `as` method was used.\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container) {\r\n const dynamicDependencies =\r\n this.dynamicDependencies.length > 0\r\n ? this.dynamicDependencies.map(dependency =>\r\n dependency['protocol:aurelia:resolver']\r\n ? dependency.get(container)\r\n : container.get(dependency)\r\n )\r\n : undefined;\r\n\r\n let fn = this.key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === 3) {\r\n fn = resolver.state;\r\n }\r\n\r\n const instance = container.invoke(fn as DependencyCtorOrFunctor, dynamicDependencies);\r\n container.registerInstance(this.asKey, instance);\r\n return instance;\r\n }\r\n\r\n /**\r\n * Instructs the NewInstance resolver to register the resolved instance using\r\n * the supplied key.\r\n * @param key The key to register the instance with.\r\n * @return Returns the NewInstance resolver.\r\n */\r\n public as(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this.asKey = key;\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates an NewInstance Resolver for the supplied key.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n * @return Returns an instance of NewInstance for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtorOrFunctor,\r\n ...dynamicDependencies: TArgs[number][]): NewInstance {\r\n return new NewInstance(key, ...dynamicDependencies);\r\n }\r\n}\r\n\r\n/**\r\n * Used by parameter decorators to call autoinject for the target and retrieve\r\n * the target's inject property.\r\n * @param target The target class.\r\n * @return Returns the target's own inject property.\r\n */\r\nexport function getDecoratorDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] }\r\n ) {\r\n autoinject(target);\r\n\r\n return target.inject;\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should be lazy loaded\r\n */\r\nexport function lazy<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: { new (...args: TArgs): TBase | TImpl },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Lazy.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should load all instances of the given\r\n * key.\r\n */\r\nexport function all<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = All.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as optional\r\n */\r\nexport function optional<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n checkParentOrTarget: boolean = true) {\r\n const deco = (checkParent: boolean) => {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Optional.of(inject[index], checkParent);\r\n };\r\n };\r\n if (typeof checkParentOrTarget === 'boolean') {\r\n return deco(checkParentOrTarget);\r\n }\r\n return deco(true);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to look at the parent container for\r\n * resolution\r\n */\r\nexport function parent<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Parent.of(inject[index]);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to create a factory method, that can\r\n * accept optional arguments\r\n */\r\nexport function factory<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Factory.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as a new instance. Instances can optionally be registered in the container\r\n * under a different key and/or use dynamic dependencies\r\n */\r\nexport function newInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n asKeyOrTarget?: PrimitiveOrDependencyCtor & { inject?: TArgs[number][] },\r\n ...dynamicDependencies: TArgs[number][]\r\n) {\r\n const deco = (asKey?: typeof asKeyOrTarget) => {\r\n return (\r\n target: { new (...args: any[]): any },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = NewInstance.of(inject[index], ...dynamicDependencies);\r\n if (!!asKey) {\r\n inject[index].as(asKey);\r\n }\r\n };\r\n };\r\n if (arguments.length >= 1) {\r\n return deco(asKeyOrTarget);\r\n }\r\n return deco();\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { AggregateError } from 'aurelia-pal';\r\nimport { resolver, StrategyResolver, Resolver, Strategy, StrategyState, Factory, NewInstance, Lazy, Optional, All, Parent } from './resolvers';\r\nimport { Invoker } from './invokers';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n DependencyCtor,\r\n PrimitiveOrDependencyCtor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args,\r\n Primitive\r\n} from './types';\r\n\r\nlet currentContainer: Container | null = null;\r\n\r\nfunction validateKey(key: any) {\r\n if (key === null || key === undefined) {\r\n throw new Error(\r\n 'key/value cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport const _emptyParameters = Object.freeze([]) as [];\r\n\r\nmetadata.registration = 'aurelia:registration';\r\nmetadata.invoker = 'aurelia:invoker';\r\n\r\nconst resolverDecorates = resolver.decorates!;\r\n\r\n/**\r\n * Stores the information needed to invoke a function.\r\n */\r\nexport class InvocationHandler<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args\r\n > {\r\n /**\r\n * The function to be invoked by this handler.\r\n */\r\n public fn: DependencyCtorOrFunctor;\r\n\r\n /**\r\n * The invoker implementation that will be used to actually invoke the function.\r\n */\r\n public invoker: Invoker;\r\n\r\n /**\r\n * The statically known dependencies of this function invocation.\r\n */\r\n public dependencies: TArgs;\r\n\r\n /**\r\n * Instantiates an InvocationDescription.\r\n * @param fn The Function described by this description object.\r\n * @param invoker The strategy for invoking the function.\r\n * @param dependencies The static dependencies of the function call.\r\n */\r\n constructor(\r\n fn: DependencyCtorOrFunctor,\r\n invoker: Invoker,\r\n dependencies: TArgs\r\n ) {\r\n this.fn = fn;\r\n this.invoker = invoker;\r\n this.dependencies = dependencies;\r\n }\r\n\r\n /**\r\n * Invokes the function.\r\n * @param container The calling container.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(container: Container, dynamicDependencies?: TArgs[]): TImpl {\r\n const previousContainer = currentContainer;\r\n currentContainer = container;\r\n try {\r\n return dynamicDependencies !== undefined\r\n ? this.invoker.invokeWithDynamicDependencies(\r\n container,\r\n this.fn,\r\n this.dependencies,\r\n dynamicDependencies\r\n )\r\n : this.invoker.invoke(container, this.fn, this.dependencies);\r\n } finally {\r\n currentContainer = previousContainer;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Used to configure a Container instance.\r\n */\r\nexport interface ContainerConfiguration {\r\n /**\r\n * An optional callback which will be called when any function needs an\r\n * InvocationHandler created (called once per Function).\r\n */\r\n onHandlerCreated?: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n handlers?: Map;\r\n}\r\n\r\nfunction invokeWithDynamicDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n) {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n let lookup;\r\n\r\n while (i--) {\r\n lookup = staticDependencies[i];\r\n\r\n if (lookup === null || lookup === undefined) {\r\n throw new Error(\r\n 'Constructor Parameter with index ' +\r\n i +\r\n ' cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n } else {\r\n args[i] = container.get(lookup);\r\n }\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return Reflect.construct(fn, args);\r\n}\r\n\r\nconst classInvoker: Invoker = {\r\n invoke(container, Type: DependencyCtor, deps) {\r\n const instances = deps.map((dep) => container.get(dep));\r\n return Reflect.construct(Type, instances);\r\n },\r\n invokeWithDynamicDependencies\r\n};\r\n\r\nfunction getDependencies(f) {\r\n if (!f.hasOwnProperty('inject')) {\r\n return [];\r\n }\r\n\r\n if (typeof f.inject === 'function') {\r\n return f.inject();\r\n }\r\n\r\n return f.inject;\r\n}\r\n\r\n/**\r\n * A lightweight, extensible dependency injection container.\r\n */\r\nexport class Container {\r\n /**\r\n * The global root Container instance. Available if makeGlobal() has been\r\n * called. Aurelia Framework calls makeGlobal().\r\n */\r\n public static instance: Container;\r\n\r\n /**\r\n * The parent container in the DI hierarchy.\r\n */\r\n public parent: Container | null;\r\n\r\n /**\r\n * The root container in the DI hierarchy.\r\n */\r\n public root: Container;\r\n\r\n /** @internal */\r\n public _configuration: ContainerConfiguration;\r\n\r\n /** @internal */\r\n public _onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n /** @internal */\r\n public _handlers: Map;\r\n\r\n /** @internal */\r\n public _resolvers: Map;\r\n\r\n /**\r\n * Creates an instance of Container.\r\n * @param configuration Provides some configuration for the new Container instance.\r\n */\r\n constructor(configuration?: ContainerConfiguration) {\r\n if (configuration === undefined) {\r\n configuration = {};\r\n }\r\n\r\n this._configuration = configuration;\r\n this._onHandlerCreated = configuration.onHandlerCreated!;\r\n this._handlers =\r\n configuration.handlers || (configuration.handlers = new Map());\r\n this._resolvers = new Map();\r\n this.root = this;\r\n this.parent = null;\r\n }\r\n\r\n /**\r\n * Makes this container instance globally reachable through Container.instance.\r\n */\r\n public makeGlobal(): Container {\r\n Container.instance = this;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets an invocation handler creation callback that will be called when new\r\n * InvocationsHandlers are created (called once per Function).\r\n * @param onHandlerCreated The callback to be called when an\r\n * InvocationsHandler is created.\r\n */\r\n public setHandlerCreatedCallback<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler\r\n ) {\r\n this._onHandlerCreated = onHandlerCreated;\r\n this._configuration.onHandlerCreated = onHandlerCreated;\r\n }\r\n\r\n /**\r\n * Registers an existing object instance with the container.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param instance The instance that will be resolved when the key is matched.\r\n * This defaults to the key value when instance is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerInstance = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n instance?: TImpl): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(0, instance === undefined ? key : instance)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container always\r\n * returns the same instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.singleton, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container returns a\r\n * new instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(2, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param handler The resolution function to use when the dependency is\r\n * needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerHandler = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n handler: (container?: Container, key?: PrimitiveOrDependencyCtor, resolver?: Resolver) => any\r\n ): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.function, handler)\r\n );\r\n }\r\n\r\n /**\r\n * Registers an additional key that serves as an alias to the original DI key.\r\n * @param originalKey The key that originally identified the dependency; usually a constructor function.\r\n * @param aliasKey An alternate key which can also be used to resolve the same dependency as the original.\r\n * @return The resolver that was registered.\r\n */\r\n public registerAlias = Impl, TArgs extends Args = Args>(\r\n originalKey: PrimitiveOrDependencyCtor,\r\n aliasKey: PrimitiveOrDependencyCtor): Resolver {\r\n return this.registerResolver(\r\n aliasKey,\r\n new StrategyResolver(5, originalKey)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param resolver The resolver to use when the dependency is needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n resolver: Resolver\r\n ): Resolver {\r\n validateKey(key);\r\n\r\n const allResolvers = this._resolvers;\r\n const result = allResolvers.get(key);\r\n\r\n if (result === undefined) {\r\n allResolvers.set(key, resolver);\r\n } else if (result.strategy === 4) {\r\n result.state.push(resolver);\r\n } else {\r\n allResolvers.set(key, new StrategyResolver(4, [result, resolver]));\r\n }\r\n\r\n return resolver;\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) by inspecting its registration\r\n * annotations. If none are found, then the default singleton registration is\r\n * used.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n */\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n fn = fn === undefined ? key as DependencyCtor : fn;\r\n\r\n if (typeof fn === 'function') {\r\n const registration = metadata.get(metadata.registration, fn);\r\n\r\n if (registration === undefined) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn));\r\n }\r\n\r\n return registration.registerResolver(this, key, fn);\r\n }\r\n\r\n return this.registerResolver(key, new StrategyResolver(0, fn));\r\n }\r\n\r\n /**\r\n * Registers an array of types (constructor functions) by inspecting their\r\n * registration annotations. If none are found, then the default singleton\r\n * registration is used.\r\n * @param fns The constructor function to use when the dependency needs to be instantiated.\r\n */\r\n public autoRegisterAll(fns: DependencyCtor[]): void {\r\n let i = fns.length;\r\n while (i--) {\r\n this.autoRegister(fns[i]);\r\n }\r\n }\r\n\r\n /**\r\n * Unregisters based on key.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n */\r\n public unregister(key: any): void {\r\n this._resolvers.delete(key);\r\n }\r\n\r\n /**\r\n * Inspects the container to determine if a particular key has been registred.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @param checkParent Indicates whether or not to check the parent container hierarchy.\r\n * @return Returns true if the key has been registred; false otherwise.\r\n */\r\n public hasResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, checkParent: boolean = false): boolean {\r\n validateKey(key);\r\n\r\n return (\r\n this._resolvers.has(key) ||\r\n (checkParent &&\r\n this.parent !== null &&\r\n this.parent.hasResolver(key, checkParent))\r\n );\r\n }\r\n\r\n /**\r\n * Gets the resolver for the particular key, if it has been registered.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @return Returns the resolver, if registred, otherwise undefined.\r\n */\r\n public getResolver<\r\n TStrategyKey extends keyof StrategyState,\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n >(\r\n key: PrimitiveOrDependencyCtorOrFunctor\r\n ): StrategyResolver {\r\n return this._resolvers.get(key);\r\n }\r\n\r\n /**\r\n * Resolves a single instance based on the provided key.\r\n * @param key The key that identifies the object to resolve.\r\n * @return Returns the resolved instance.\r\n */\r\n public get | Lazy | Factory | Optional | Parent | All>(\r\n key: TResolver): ResolvedValue;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: typeof Container): Container;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor | typeof Container): ImplOrAny | Container {\r\n validateKey(key);\r\n\r\n if (key === Container) {\r\n return this;\r\n }\r\n\r\n if (resolverDecorates(key)) {\r\n return key.get(this, key);\r\n }\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key as DependencyCtor).get(this, key);\r\n }\r\n\r\n const registration = metadata.get(metadata.registration, key);\r\n\r\n if (registration === undefined) {\r\n return this.parent._get(key);\r\n }\r\n\r\n return registration.registerResolver(\r\n this, key, key as DependencyCtorOrFunctor).get(this, key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n public _get(key) {\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n\r\n return this.parent._get(key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n /**\r\n * Resolves all instance registered under the provided key.\r\n * @param key The key that identifies the objects to resolve.\r\n * @return Returns an array of the resolved instances.\r\n */\r\n public getAll = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny[] {\r\n validateKey(key);\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return _emptyParameters;\r\n }\r\n\r\n return this.parent.getAll(key);\r\n }\r\n\r\n if (resolver.strategy === 4) {\r\n const state = resolver.state;\r\n let i = state.length;\r\n const results = new Array(i);\r\n\r\n while (i--) {\r\n results[i] = state[i].get(this, key);\r\n }\r\n\r\n return results;\r\n }\r\n\r\n return [resolver.get(this, key)];\r\n }\r\n\r\n /**\r\n * Creates a new dependency injection container whose parent is the current container.\r\n * @return Returns a new container instance parented to this.\r\n */\r\n public createChild(): Container {\r\n const child = new Container(this._configuration);\r\n child.root = this.root;\r\n child.parent = this;\r\n return child;\r\n }\r\n\r\n /**\r\n * Invokes a function, recursively resolving its dependencies.\r\n * @param fn The function to invoke with the auto-resolved dependencies.\r\n * @param dynamicDependencies Additional function dependencies to use during invocation.\r\n * @return Returns the instance resulting from calling the function.\r\n */\r\n public invoke = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor,\r\n dynamicDependencies?: TArgs[number][]\r\n ): ImplOrAny {\r\n try {\r\n let handler = this._handlers.get(fn);\r\n\r\n if (handler === undefined) {\r\n handler = this._createInvocationHandler(fn);\r\n this._handlers.set(fn, handler);\r\n }\r\n\r\n return handler.invoke(this, dynamicDependencies);\r\n } catch (e) {\r\n // @ts-expect-error AggregateError returns an Error in its type hence it fails (new ...) but it's fine\r\n throw new AggregateError(\r\n `Error invoking ${fn.name}. Check the inner error for details.`,\r\n e as Error | undefined,\r\n true\r\n );\r\n }\r\n }\r\n\r\n public _createInvocationHandler\r\n = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor & { inject?: any; }\r\n ): InvocationHandler {\r\n let dependencies;\r\n\r\n if (fn.inject === undefined) {\r\n dependencies =\r\n metadata.getOwn(metadata.paramTypes, fn) || _emptyParameters;\r\n } else {\r\n dependencies = [];\r\n let ctor = fn;\r\n while (typeof ctor === 'function') {\r\n dependencies.push(...getDependencies(ctor));\r\n ctor = Object.getPrototypeOf(ctor);\r\n }\r\n }\r\n\r\n const invoker = metadata.getOwn(metadata.invoker, fn) || classInvoker;\r\n\r\n const handler = new InvocationHandler(fn, invoker, dependencies);\r\n return this._onHandlerCreated !== undefined\r\n ? this._onHandlerCreated(handler)\r\n : handler;\r\n }\r\n}\r\n\r\nexport type ResolvedValue =\r\n T extends { new (...args: any[]): infer R }\r\n ? R\r\n : T extends Factory\r\n ? (...args: unknown[]) => R\r\n : T extends Lazy\r\n ? () => R\r\n : T extends NewInstance\r\n ? R\r\n : T extends Optional\r\n ? R | null\r\n : T extends All\r\n ? R[]\r\n : T extends Parent\r\n ? R | null\r\n : T extends [infer T1, ...infer T2]\r\n ? [ResolvedValue, ...ResolvedValue]\r\n : T;\r\n\r\n/**\r\n * Resolve a key, or list of keys based on the current container.\r\n * \r\n * @example\r\n * ```ts\r\n * import { resolve } from 'aurelia-framework';\r\n * // or\r\n * // import { Container, resolve } from 'aurelia-dependency-injection';\r\n * \r\n * class MyCustomElement {\r\n * someService = resolve(MyService);\r\n * }\r\n * ```\r\n */\r\nexport function resolve(key: K): ResolvedValue;\r\nexport function resolve(...keys: K): ResolvedValue\r\nexport function resolve(...keys: K) {\r\n if (currentContainer == null) {\r\n throw new Error(`There is not a currently active container to resolve \"${String(keys)}\". Are you trying to \"new SomeClass(...)\" that has a resolve(...) call?`);\r\n }\r\n \r\n return keys.length === 1\r\n ? currentContainer.get(keys[0])\r\n : keys.map(containerGetKey, currentContainer);\r\n}\r\n\r\nfunction containerGetKey(this: Container, key: any) {\r\n return this.get(key);\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { DependencyCtorOrFunctor, ImplOrAny, Impl, Args, DependencyCtor, DependencyFunctor } from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom Invoker for the decorated item.\r\n */\r\nexport function invoker, TArgs extends Args>(\r\n value: Invoker\r\n): (target: DependencyCtor) => void {\r\n return target => {\r\n metadata.define(metadata.invoker, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies that the decorated item should be called as a factory\r\n * function, rather than a constructor.\r\n */\r\nexport function invokeAsFactory, TArgs extends Args>(\r\n potentialTarget?: DependencyCtor\r\n): void | ((target: DependencyCtor) => void) {\r\n const deco = (target: DependencyCtor) => {\r\n metadata.define(metadata.invoker, FactoryInvoker.instance, target);\r\n };\r\n\r\n return potentialTarget ? deco(potentialTarget) : deco;\r\n}\r\n\r\n/**\r\n * A strategy for invoking a function, resulting in an object instance.\r\n */\r\nexport interface Invoker, TArgs extends Args> {\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during\r\n * invocation.\r\n * @return The result of the function invocation.\r\n */\r\n invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny;\r\n}\r\n\r\n/**\r\n * An Invoker that is used to invoke a factory method.\r\n */\r\nexport class FactoryInvoker<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > implements Invoker {\r\n /**\r\n * The singleton instance of the FactoryInvoker.\r\n */\r\n public static instance: FactoryInvoker;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny {\r\n let i = dependencies.length;\r\n const args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(dependencies[i]);\r\n }\r\n\r\n return ((fn as DependencyFunctor).apply(undefined, args as TArgs)) as ImplOrAny;\r\n }\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(staticDependencies[i]);\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return (fn as DependencyFunctor).apply(undefined, args as TArgs) as ImplOrAny;\r\n }\r\n}\r\n\r\nFactoryInvoker.instance = new FactoryInvoker();\r\n","import './internal';\r\nimport { Resolver } from './resolvers';\r\nimport { Container } from './container';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtor,\r\n Impl,\r\n Args,\r\n DependencyCtor\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom registration strategy for the decorated\r\n * class/function.\r\n */\r\nexport function registration, TArgs extends Args>(\r\n value: Registration) {\r\n return (target: DependencyCtor) => {\r\n metadata.define(metadata.registration, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"transient\"\r\n * lifetime.\r\n */\r\nexport function transient, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor) {\r\n return registration(new TransientRegistration(key));\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"singleton\"\r\n * lifetime.\r\n */\r\nexport function singleton(registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor, registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean, registerInChild: boolean = false) {\r\n return registration(\r\n new SingletonRegistration(keyOrRegisterInChild, registerInChild)\r\n );\r\n}\r\n\r\n/**\r\n * Customizes how a particular function is resolved by the Container.\r\n */\r\nexport interface Registration<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args> {\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver;\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * transients with the container.\r\n */\r\nexport class TransientRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of TransientRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(key?: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const existingResolver = container.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? container.registerTransient(\r\n (this._key || key) as string,\r\n fn as DependencyCtorOrFunctor)\r\n : existingResolver;\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * singletons with the container.\r\n */\r\nexport class SingletonRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _registerInChild: boolean;\r\n\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of SingletonRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean,\r\n registerInChild: boolean = false) {\r\n if (typeof keyOrRegisterInChild === 'boolean') {\r\n this._registerInChild = keyOrRegisterInChild;\r\n } else {\r\n this._key = keyOrRegisterInChild;\r\n this._registerInChild = registerInChild;\r\n }\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const targetContainer = this._registerInChild ? container : container.root;\r\n const existingResolver = targetContainer.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? targetContainer.registerSingleton(this._key || key, fn)\r\n : existingResolver;\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAsCA;AACO,SAAS,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;AAC1D,IAAI,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;AACjI,IAAI,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AACnI,SAAS,KAAK,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAA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hC,WACE,CAAA,oBAA+E,EAC/E,eAAA,GAA2B,KAAK,EAAA;AAChC,QAAA,IAAI,OAAO,oBAAoB,KAAK,SAAS,EAAE;AAC7C,YAAA,IAAI,CAAC,gBAAgB,GAAG,oBAAoB,CAAC;SAC9C;aAAM;AACL,YAAA,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;AACjC,YAAA,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;SACzC;KACF;AASM,IAAA,gBAAgB,CACrB,SAAoB,EACpB,GAAmD,EACnD,EAAgD,EAAA;AAEhD,QAAA,MAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC;AAC3E,QAAA,MAAM,gBAAgB,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC;QACvE,OAAO,gBAAgB,KAAK,SAAS;AACnC,cAAE,eAAe,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,EAAE,EAAE,CAAC;cACvD,gBAAgB,CAAC;KACtB;AACF;;;;","x_google_ignoreList":[0]} \ No newline at end of file +{"version":3,"file":"aurelia-dependency-injection.js","sources":["../../node_modules/tslib/tslib.es6.js","../../../src/injection.ts","../../../src/resolvers.ts","../../../src/container.ts","../../../src/invokers.ts","../../../src/registrations.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","import { metadata } from 'aurelia-metadata';\r\nimport { _emptyParameters } from './container';\r\nimport { Args, Impl, DependencyCtor } from './types';\r\n\r\n// tslint:disable-next-line:ban-types\r\nexport type Injectable = Function & { inject?: any[] | (() => any[]) };\r\n\r\nfunction isInjectable(potentialTarget: any): potentialTarget is Injectable {\r\n return !!potentialTarget;\r\n}\r\n\r\n/**\r\n * Decorator: Directs the TypeScript transpiler to write-out type metadata for\r\n * the decorated class.\r\n */\r\nexport function autoinject(\r\n potentialTarget?: TPotential\r\n): TPotential extends Injectable ? void : (target: Injectable) => void {\r\n const deco = (target: Injectable): void => {\r\n if (!target.hasOwnProperty('inject')) {\r\n target.inject = (\r\n (metadata.getOwn(metadata.paramTypes, target) as any[]) ||\r\n _emptyParameters\r\n ).slice();\r\n if (target.inject && target.inject.length > 0) {\r\n // TypeScript 3.0 metadata for \"...rest\" gives type \"Object\"\r\n // if last parameter is \"Object\", assume it's a ...rest and remove that\r\n // metadata.\r\n if (target.inject[target.inject.length - 1] === Object) {\r\n target.inject.splice(-1, 1);\r\n }\r\n }\r\n }\r\n };\r\n if (isInjectable(potentialTarget)) {\r\n return deco(potentialTarget) as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n }\r\n return deco as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n}\r\n/**\r\n * Decorator: Specifies the dependencies that should be injected by the DI Container into the decorated class/function.\r\n */\r\nexport function inject<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(...rest: TArgs[number][]): any {\r\n return (\r\n target: DependencyCtor & { inject: any },\r\n _key: any,\r\n descriptor: any) => {\r\n // handle when used as a constructor parameter decorator\r\n if (typeof descriptor === 'number') {\r\n autoinject(target);\r\n if (rest.length === 1) {\r\n target.inject[descriptor] = rest[0];\r\n }\r\n return;\r\n }\r\n // if it's true then we injecting rest into function and not Class constructor\r\n if (descriptor) {\r\n const fn = descriptor.value;\r\n fn.inject = rest;\r\n } else {\r\n target.inject = rest;\r\n }\r\n };\r\n}\r\n","import { protocol } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { autoinject } from './injection';\r\nimport type {\r\n PrimitiveOrDependencyCtor,\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n DependencyCtor,\r\n DependencyFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Indicates that the decorated class/object is a custom resolver.\r\n */\r\nexport const resolver: {\r\n decorates?: (key: any) => key is { get(container: Container, key: any): any };\r\n} & (() => any) = ((protocol as unknown) as { create(...args: any[]): any }).create(\r\n 'aurelia:resolver',\r\n (target): string | boolean => {\r\n if (!(typeof target.get === 'function')) {\r\n return 'Resolvers must implement: get(container: Container, key: any): any';\r\n }\r\n\r\n return true;\r\n }\r\n);\r\n\r\n/**\r\n * Used to allow functions/classes to specify custom dependency resolution logic.\r\n */\r\nexport interface Resolver {\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n get(container: Container, key: any): any;\r\n}\r\n\r\nexport enum Strategy {\r\n instance = 0,\r\n singleton = 1,\r\n transient = 2,\r\n function = 3,\r\n array = 4,\r\n alias = 5\r\n}\r\nexport type IStrategy = 1 | 2 | 3 | 4 | 5;\r\n\r\nexport type StrategyFunctor<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > = (\r\n container?: Container,\r\n ctor?: PrimitiveOrDependencyCtorOrFunctor,\r\n strategyResolver?: any\r\n ) => TImpl;\r\n\r\nexport interface StrategyState<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > {\r\n [Strategy.instance]: TImpl;\r\n [Strategy.singleton]: DependencyCtorOrFunctor;\r\n [Strategy.transient]: DependencyCtorOrFunctor;\r\n [Strategy.function]: StrategyFunctor;\r\n /**\r\n * For typings purposes, this is done as ({ get: StrategyFunctor } | TImpl)[]\r\n * But it should be understood, and used as [{ get: StrategyFunctor }, ...TImp[]]\r\n */\r\n [Strategy.array]: ({\r\n get: (\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor\r\n ) => TImpl\r\n } | TImpl)[];\r\n [Strategy.alias]: any;\r\n}\r\n\r\nfunction isStrategy<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TKey extends keyof StrategyState\r\n>(\r\n actual: Strategy,\r\n expected: TKey,\r\n state):\r\n state is StrategyState[TKey] {\r\n return actual === expected;\r\n}\r\n/**\r\n * Used to resolve instances, singletons, transients, aliases\r\n */\r\n@resolver()\r\nexport class StrategyResolver<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TStrategyKey extends keyof StrategyState> {\r\n\r\n public strategy: keyof StrategyState;\r\n public state: StrategyState[keyof StrategyState];\r\n\r\n /**\r\n * Creates an instance of the StrategyResolver class.\r\n * @param strategy The type of resolution strategy.\r\n * @param state The state associated with the resolution strategy.\r\n */\r\n constructor(strategy: TStrategyKey, state: StrategyState[TStrategyKey]) {\r\n this.strategy = strategy;\r\n this.state = state;\r\n }\r\n\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n public get(container: Container, key: PrimitiveOrDependencyCtor) {\r\n if (isStrategy(this.strategy, Strategy.instance, this.state)) {\r\n return this.state;\r\n }\r\n if (isStrategy(this.strategy, Strategy.singleton, this.state)) {\r\n const singleton = container.invoke(this.state);\r\n this.state = singleton;\r\n this.strategy = 0;\r\n return singleton;\r\n }\r\n if (isStrategy(this.strategy, Strategy.transient, this.state)) {\r\n return container.invoke(this.state);\r\n }\r\n if (isStrategy(this.strategy, Strategy.function, this.state)) {\r\n return this.state(container, key, this);\r\n }\r\n if (isStrategy(this.strategy, Strategy.array, this.state)) {\r\n return (this.state[0] as { get: StrategyFunctor }).get(container, key);\r\n }\r\n if (isStrategy(this.strategy, Strategy.alias, this.state)) {\r\n return container.get(this.state) as TImpl;\r\n }\r\n throw new Error('Invalid strategy: ' + this.strategy);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify lazy resolution logic.\r\n */\r\n@resolver()\r\nexport class Lazy = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'lazy';\r\n\r\n /**\r\n * Creates an instance of the Lazy class.\r\n * @param key The key to lazily resolve.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to lazily resolve the dependency into a lazy locator\r\n * function.\r\n * @param container The container to resolve from.\r\n * @return Returns a function which can be invoked at a later time to obtain\r\n * the actual dependency.\r\n */\r\n public get(container: Container): () => ImplOrAny {\r\n return () => container.get(this._key);\r\n }\r\n\r\n /**\r\n * Creates a Lazy Resolver for the supplied key.\r\n * @param key The key to lazily resolve.\r\n * @return Returns an instance of Lazy for the key.\r\n */\r\n public static of<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ) {\r\n return new Lazy(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify resolution of all matches to a key.\r\n */\r\n@resolver()\r\nexport class All = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'all';\r\n\r\n /**\r\n * Creates an instance of the All class.\r\n * @param key The key to lazily resolve all matches for.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to resolve all matching dependencies as an array of\r\n * instances.\r\n * @param container The container to resolve from.\r\n * @return Returns an array of all matching instances.\r\n */\r\n public get(container: Container): TImpl[] {\r\n return container.getAll(this._key);\r\n }\r\n\r\n /**\r\n * Creates an All Resolver for the supplied key.\r\n * @param key The key to resolve all instances for.\r\n * @return Returns an instance of All for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): All {\r\n return new All(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify an optional dependency, which will\r\n * be resolved only if already registred with the container.\r\n */\r\n@resolver()\r\nexport class Optional = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /** @internal */\r\n public _checkParent: boolean;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'optional';\r\n\r\n /**\r\n * Creates an instance of the Optional class.\r\n * @param key The key to optionally resolve for.\r\n * @param checkParent Indicates whether or not the parent container hierarchy\r\n * should be checked.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor, checkParent: boolean = true) {\r\n this._key = key;\r\n this._checkParent = checkParent;\r\n }\r\n\r\n /**\r\n * Called by the container to provide optional resolution of the key.\r\n * @param container The container to resolve from.\r\n * @return Returns the instance if found; otherwise null.\r\n */\r\n public get(container: Container): TImpl | null {\r\n if (container.hasResolver(this._key, this._checkParent)) {\r\n return container.get(this._key);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Creates an Optional Resolver for the supplied key.\r\n * @param key The key to optionally resolve for.\r\n * @param [checkParent=true] Indicates whether or not the parent container\r\n * hierarchy should be checked.\r\n * @return Returns an instance of Optional for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n checkParent: boolean = true): Optional {\r\n return new Optional(key, checkParent);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject the dependency from the parent container instead of the current\r\n * one.\r\n */\r\n@resolver()\r\nexport class Parent = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'parent';\r\n\r\n /**\r\n * Creates an instance of the Parent class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to load the dependency from the parent container\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container): TImpl | null {\r\n return container.parent ? container.parent.get(this._key) : null;\r\n }\r\n\r\n /**\r\n * Creates a Parent Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Parent for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): Parent {\r\n return new Parent(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow injecting dependencies but also passing data to the constructor.\r\n */\r\n@resolver()\r\nexport class Factory = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtorOrFunctor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'factory';\r\n\r\n /**\r\n * Creates an instance of the Factory class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to pass the dependencies to the constructor.\r\n * @param container The container to invoke the constructor with dependencies\r\n * and other parameters.\r\n * @return Returns a function that can be invoked to resolve dependencies\r\n * later, and the rest of the parameters.\r\n */\r\n public get(container: Container): DependencyFunctor {\r\n let fn = this._key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === Strategy.function) {\r\n fn = resolver.state;\r\n }\r\n\r\n return (...rest) => container.invoke(fn as DependencyCtorOrFunctor, rest);\r\n }\r\n\r\n /**\r\n * Creates a Factory Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Factory for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: DependencyCtor\r\n ): Factory {\r\n return new Factory(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject a new instance of a dependency, without regard for existing\r\n * instances in the container. Instances can optionally be registered in the\r\n * container\r\n * under a different key by supplying a key using the `as` method.\r\n */\r\n@resolver()\r\nexport class NewInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public key: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public asKey: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public dynamicDependencies: TArgs[number][];\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'newInstance';\r\n\r\n /**\r\n * Creates an instance of the NewInstance class.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor, ...dynamicDependencies: TArgs[number][]) {\r\n this.key = key;\r\n this.asKey = key;\r\n this.dynamicDependencies = dynamicDependencies;\r\n }\r\n\r\n /**\r\n * Called by the container to instantiate the dependency and potentially\r\n * register\r\n * as another key if the `as` method was used.\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container) {\r\n const dynamicDependencies =\r\n this.dynamicDependencies.length > 0\r\n ? this.dynamicDependencies.map(dependency =>\r\n dependency['protocol:aurelia:resolver']\r\n ? dependency.get(container)\r\n : container.get(dependency)\r\n )\r\n : undefined;\r\n\r\n let fn = this.key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === 3) {\r\n fn = resolver.state;\r\n }\r\n\r\n const instance = container.invoke(fn as DependencyCtorOrFunctor, dynamicDependencies);\r\n container.registerInstance(this.asKey, instance);\r\n return instance;\r\n }\r\n\r\n /**\r\n * Instructs the NewInstance resolver to register the resolved instance using\r\n * the supplied key.\r\n * @param key The key to register the instance with.\r\n * @return Returns the NewInstance resolver.\r\n */\r\n public as(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this.asKey = key;\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates an NewInstance Resolver for the supplied key.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n * @return Returns an instance of NewInstance for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtorOrFunctor,\r\n ...dynamicDependencies: TArgs[number][]): NewInstance {\r\n return new NewInstance(key, ...dynamicDependencies);\r\n }\r\n}\r\n\r\n/**\r\n * Used by parameter decorators to call autoinject for the target and retrieve\r\n * the target's inject property.\r\n * @param target The target class.\r\n * @return Returns the target's own inject property.\r\n */\r\nexport function getDecoratorDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] }\r\n ) {\r\n autoinject(target);\r\n\r\n return target.inject;\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should be lazy loaded\r\n */\r\nexport function lazy<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: { new (...args: TArgs): TBase | TImpl },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Lazy.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should load all instances of the given\r\n * key.\r\n */\r\nexport function all<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = All.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as optional\r\n */\r\nexport function optional<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n checkParentOrTarget: boolean = true) {\r\n const deco = (checkParent: boolean) => {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Optional.of(inject[index], checkParent);\r\n };\r\n };\r\n if (typeof checkParentOrTarget === 'boolean') {\r\n return deco(checkParentOrTarget);\r\n }\r\n return deco(true);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to look at the parent container for\r\n * resolution\r\n */\r\nexport function parent<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Parent.of(inject[index]);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to create a factory method, that can\r\n * accept optional arguments\r\n */\r\nexport function factory<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Factory.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as a new instance. Instances can optionally be registered in the container\r\n * under a different key and/or use dynamic dependencies\r\n */\r\nexport function newInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n asKeyOrTarget?: PrimitiveOrDependencyCtor & { inject?: TArgs[number][] },\r\n ...dynamicDependencies: TArgs[number][]\r\n) {\r\n const deco = (asKey?: typeof asKeyOrTarget) => {\r\n return (\r\n target: { new (...args: any[]): any },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = NewInstance.of(inject[index], ...dynamicDependencies);\r\n if (!!asKey) {\r\n inject[index].as(asKey);\r\n }\r\n };\r\n };\r\n if (arguments.length >= 1) {\r\n return deco(asKeyOrTarget);\r\n }\r\n return deco();\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { AggregateError } from 'aurelia-pal';\r\nimport { resolver, StrategyResolver, Resolver, Strategy, StrategyState, Factory, NewInstance, Lazy, Optional, All, Parent } from './resolvers';\r\nimport { Invoker } from './invokers';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n DependencyCtor,\r\n PrimitiveOrDependencyCtor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args,\r\n Primitive\r\n} from './types';\r\n\r\nlet currentContainer: Container | null = null;\r\n\r\nfunction validateKey(key: any) {\r\n if (key === null || key === undefined) {\r\n throw new Error(\r\n 'key/value cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport const _emptyParameters = Object.freeze([]) as [];\r\n\r\nmetadata.registration = 'aurelia:registration';\r\nmetadata.invoker = 'aurelia:invoker';\r\n\r\nconst resolverDecorates = resolver.decorates!;\r\n\r\n/**\r\n * Stores the information needed to invoke a function.\r\n */\r\nexport class InvocationHandler<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args\r\n > {\r\n /**\r\n * The function to be invoked by this handler.\r\n */\r\n public fn: DependencyCtorOrFunctor;\r\n\r\n /**\r\n * The invoker implementation that will be used to actually invoke the function.\r\n */\r\n public invoker: Invoker;\r\n\r\n /**\r\n * The statically known dependencies of this function invocation.\r\n */\r\n public dependencies: TArgs;\r\n\r\n /**\r\n * Instantiates an InvocationDescription.\r\n * @param fn The Function described by this description object.\r\n * @param invoker The strategy for invoking the function.\r\n * @param dependencies The static dependencies of the function call.\r\n */\r\n constructor(\r\n fn: DependencyCtorOrFunctor,\r\n invoker: Invoker,\r\n dependencies: TArgs\r\n ) {\r\n this.fn = fn;\r\n this.invoker = invoker;\r\n this.dependencies = dependencies;\r\n }\r\n\r\n /**\r\n * Invokes the function.\r\n * @param container The calling container.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(container: Container, dynamicDependencies?: TArgs[]): TImpl {\r\n const previousContainer = currentContainer;\r\n currentContainer = container;\r\n try {\r\n return dynamicDependencies !== undefined\r\n ? this.invoker.invokeWithDynamicDependencies(\r\n container,\r\n this.fn,\r\n this.dependencies,\r\n dynamicDependencies\r\n )\r\n : this.invoker.invoke(container, this.fn, this.dependencies);\r\n } finally {\r\n currentContainer = previousContainer;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Used to configure a Container instance.\r\n */\r\nexport interface ContainerConfiguration {\r\n /**\r\n * An optional callback which will be called when any function needs an\r\n * InvocationHandler created (called once per Function).\r\n */\r\n onHandlerCreated?: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n handlers?: Map;\r\n}\r\n\r\nfunction invokeWithDynamicDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n) {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n let lookup;\r\n\r\n while (i--) {\r\n lookup = staticDependencies[i];\r\n\r\n if (lookup === null || lookup === undefined) {\r\n throw new Error(\r\n 'Constructor Parameter with index ' +\r\n i +\r\n ' cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n } else {\r\n args[i] = container.get(lookup);\r\n }\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return Reflect.construct(fn, args);\r\n}\r\n\r\nconst classInvoker: Invoker = {\r\n invoke(container, Type: DependencyCtor, deps) {\r\n const instances = deps.map((dep) => container.get(dep));\r\n return Reflect.construct(Type, instances);\r\n },\r\n invokeWithDynamicDependencies\r\n};\r\n\r\nfunction getDependencies(f) {\r\n if (!f.hasOwnProperty('inject')) {\r\n return [];\r\n }\r\n\r\n if (typeof f.inject === 'function') {\r\n return f.inject();\r\n }\r\n\r\n return f.inject;\r\n}\r\n\r\n/**\r\n * A lightweight, extensible dependency injection container.\r\n */\r\nexport class Container {\r\n /**\r\n * The global root Container instance. Available if makeGlobal() has been\r\n * called. Aurelia Framework calls makeGlobal().\r\n */\r\n public static instance: Container;\r\n\r\n /**\r\n * The parent container in the DI hierarchy.\r\n */\r\n public parent: Container | null;\r\n\r\n /**\r\n * The root container in the DI hierarchy.\r\n */\r\n public root: Container;\r\n\r\n /** @internal */\r\n public _configuration: ContainerConfiguration;\r\n\r\n /** @internal */\r\n public _onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n /** @internal */\r\n public _handlers: Map;\r\n\r\n /** @internal */\r\n public _resolvers: Map;\r\n\r\n /**\r\n * Creates an instance of Container.\r\n * @param configuration Provides some configuration for the new Container instance.\r\n */\r\n constructor(configuration?: ContainerConfiguration) {\r\n if (configuration === undefined) {\r\n configuration = {};\r\n }\r\n\r\n this._configuration = configuration;\r\n this._onHandlerCreated = configuration.onHandlerCreated!;\r\n this._handlers =\r\n configuration.handlers || (configuration.handlers = new Map());\r\n this._resolvers = new Map();\r\n this.root = this;\r\n this.parent = null;\r\n }\r\n\r\n /**\r\n * Makes this container instance globally reachable through Container.instance.\r\n */\r\n public makeGlobal(): Container {\r\n Container.instance = this;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets an invocation handler creation callback that will be called when new\r\n * InvocationsHandlers are created (called once per Function).\r\n * @param onHandlerCreated The callback to be called when an\r\n * InvocationsHandler is created.\r\n */\r\n public setHandlerCreatedCallback<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler\r\n ) {\r\n this._onHandlerCreated = onHandlerCreated;\r\n this._configuration.onHandlerCreated = onHandlerCreated;\r\n }\r\n\r\n /**\r\n * Registers an existing object instance with the container.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param instance The instance that will be resolved when the key is matched.\r\n * This defaults to the key value when instance is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerInstance = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n instance?: TImpl): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(0, instance === undefined ? key : instance)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container always\r\n * returns the same instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.singleton, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container returns a\r\n * new instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(2, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param handler The resolution function to use when the dependency is\r\n * needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerHandler = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n handler: (container?: Container, key?: PrimitiveOrDependencyCtor, resolver?: Resolver) => any\r\n ): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.function, handler)\r\n );\r\n }\r\n\r\n /**\r\n * Registers an additional key that serves as an alias to the original DI key.\r\n * @param originalKey The key that originally identified the dependency; usually a constructor function.\r\n * @param aliasKey An alternate key which can also be used to resolve the same dependency as the original.\r\n * @return The resolver that was registered.\r\n */\r\n public registerAlias = Impl, TArgs extends Args = Args>(\r\n originalKey: PrimitiveOrDependencyCtor,\r\n aliasKey: PrimitiveOrDependencyCtor): Resolver {\r\n return this.registerResolver(\r\n aliasKey,\r\n new StrategyResolver(5, originalKey)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param resolver The resolver to use when the dependency is needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n resolver: Resolver\r\n ): Resolver {\r\n validateKey(key);\r\n\r\n const allResolvers = this._resolvers;\r\n const result = allResolvers.get(key);\r\n\r\n if (result === undefined) {\r\n allResolvers.set(key, resolver);\r\n } else if (result.strategy === 4) {\r\n result.state.push(resolver);\r\n } else {\r\n allResolvers.set(key, new StrategyResolver(4, [result, resolver]));\r\n }\r\n\r\n return resolver;\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) by inspecting its registration\r\n * annotations. If none are found, then the default singleton registration is\r\n * used.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n */\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n fn = fn === undefined ? key as DependencyCtor : fn;\r\n\r\n if (typeof fn === 'function') {\r\n const registration = metadata.get(metadata.registration, fn);\r\n\r\n if (registration === undefined) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn));\r\n }\r\n\r\n return registration.registerResolver(this, key, fn);\r\n }\r\n\r\n return this.registerResolver(key, new StrategyResolver(0, fn));\r\n }\r\n\r\n /**\r\n * Registers an array of types (constructor functions) by inspecting their\r\n * registration annotations. If none are found, then the default singleton\r\n * registration is used.\r\n * @param fns The constructor function to use when the dependency needs to be instantiated.\r\n */\r\n public autoRegisterAll(fns: DependencyCtor[]): void {\r\n let i = fns.length;\r\n while (i--) {\r\n this.autoRegister(fns[i]);\r\n }\r\n }\r\n\r\n /**\r\n * Unregisters based on key.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n */\r\n public unregister(key: any): void {\r\n this._resolvers.delete(key);\r\n }\r\n\r\n /**\r\n * Inspects the container to determine if a particular key has been registred.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @param checkParent Indicates whether or not to check the parent container hierarchy.\r\n * @return Returns true if the key has been registred; false otherwise.\r\n */\r\n public hasResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, checkParent: boolean = false): boolean {\r\n validateKey(key);\r\n\r\n return (\r\n this._resolvers.has(key) ||\r\n (checkParent &&\r\n this.parent !== null &&\r\n this.parent.hasResolver(key, checkParent))\r\n );\r\n }\r\n\r\n /**\r\n * Gets the resolver for the particular key, if it has been registered.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @return Returns the resolver, if registred, otherwise undefined.\r\n */\r\n public getResolver<\r\n TStrategyKey extends keyof StrategyState,\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n >(\r\n key: PrimitiveOrDependencyCtorOrFunctor\r\n ): StrategyResolver {\r\n return this._resolvers.get(key);\r\n }\r\n\r\n /**\r\n * Resolves a single instance based on the provided key.\r\n * @param key The key that identifies the object to resolve.\r\n * @return Returns the resolved instance.\r\n */\r\n public get | Lazy | Factory | Optional | Parent | All>(\r\n key: TResolver): ResolvedValue;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: typeof Container): Container;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor | typeof Container): ImplOrAny | Container {\r\n validateKey(key);\r\n\r\n if (key === Container) {\r\n return this;\r\n }\r\n\r\n if (resolverDecorates(key)) {\r\n return key.get(this, key);\r\n }\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key as DependencyCtor).get(this, key);\r\n }\r\n\r\n const registration = metadata.get(metadata.registration, key);\r\n\r\n if (registration === undefined) {\r\n return this.parent._get(key);\r\n }\r\n\r\n return registration.registerResolver(\r\n this, key, key as DependencyCtorOrFunctor).get(this, key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n public _get(key) {\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n\r\n return this.parent._get(key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n /**\r\n * Resolves all instance registered under the provided key.\r\n * @param key The key that identifies the objects to resolve.\r\n * @return Returns an array of the resolved instances.\r\n */\r\n public getAll = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny[] {\r\n validateKey(key);\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return _emptyParameters;\r\n }\r\n\r\n return this.parent.getAll(key);\r\n }\r\n\r\n if (resolver.strategy === 4) {\r\n const state = resolver.state;\r\n let i = state.length;\r\n const results = new Array(i);\r\n\r\n while (i--) {\r\n results[i] = state[i].get(this, key);\r\n }\r\n\r\n return results;\r\n }\r\n\r\n return [resolver.get(this, key)];\r\n }\r\n\r\n /**\r\n * Creates a new dependency injection container whose parent is the current container.\r\n * @return Returns a new container instance parented to this.\r\n */\r\n public createChild(): Container {\r\n const child = new Container(this._configuration);\r\n child.root = this.root;\r\n child.parent = this;\r\n return child;\r\n }\r\n\r\n /**\r\n * Invokes a function, recursively resolving its dependencies.\r\n * @param fn The function to invoke with the auto-resolved dependencies.\r\n * @param dynamicDependencies Additional function dependencies to use during invocation.\r\n * @return Returns the instance resulting from calling the function.\r\n */\r\n public invoke = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor,\r\n dynamicDependencies?: TArgs[number][]\r\n ): ImplOrAny {\r\n try {\r\n let handler = this._handlers.get(fn);\r\n\r\n if (handler === undefined) {\r\n handler = this._createInvocationHandler(fn);\r\n this._handlers.set(fn, handler);\r\n }\r\n\r\n return handler.invoke(this, dynamicDependencies);\r\n } catch (e) {\r\n // @ts-expect-error AggregateError returns an Error in its type hence it fails (new ...) but it's fine\r\n throw new AggregateError(\r\n `Error invoking ${fn.name}. Check the inner error for details.`,\r\n e as Error | undefined,\r\n true\r\n );\r\n }\r\n }\r\n\r\n public _createInvocationHandler\r\n = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor & { inject?: any; }\r\n ): InvocationHandler {\r\n let dependencies;\r\n\r\n if (fn.inject === undefined) {\r\n dependencies =\r\n metadata.getOwn(metadata.paramTypes, fn) || _emptyParameters;\r\n } else {\r\n dependencies = [];\r\n let ctor = fn;\r\n while (typeof ctor === 'function') {\r\n dependencies.push(...getDependencies(ctor));\r\n ctor = Object.getPrototypeOf(ctor);\r\n }\r\n }\r\n\r\n const invoker = metadata.getOwn(metadata.invoker, fn) || classInvoker;\r\n\r\n const handler = new InvocationHandler(fn, invoker, dependencies);\r\n return this._onHandlerCreated !== undefined\r\n ? this._onHandlerCreated(handler)\r\n : handler;\r\n }\r\n}\r\n\r\nexport type ResolvedValue =\r\n T extends (new (...args: any[]) => infer R)\r\n ? R\r\n : T extends (abstract new (...args: any[]) => infer R)\r\n ? R\r\n : T extends Factory\r\n ? (...args: unknown[]) => R\r\n : T extends Lazy\r\n ? () => R\r\n : T extends NewInstance\r\n ? R\r\n : T extends Optional\r\n ? R | null\r\n : T extends All\r\n ? R[]\r\n : T extends Parent\r\n ? R | null\r\n : T extends [infer T1, ...infer T2]\r\n ? [ResolvedValue, ...ResolvedValue]\r\n : T;\r\n\r\n/**\r\n * Resolve a key, or list of keys based on the current container.\r\n * \r\n * @example\r\n * ```ts\r\n * import { resolve } from 'aurelia-framework';\r\n * // or\r\n * // import { Container, resolve } from 'aurelia-dependency-injection';\r\n * \r\n * class MyCustomElement {\r\n * someService = resolve(MyService);\r\n * }\r\n * ```\r\n */\r\nexport function resolve(key: K): ResolvedValue;\r\nexport function resolve(...keys: K): ResolvedValue\r\nexport function resolve(...keys: K) {\r\n if (currentContainer == null) {\r\n throw new Error(`There is not a currently active container to resolve \"${String(keys)}\". Are you trying to \"new SomeClass(...)\" that has a resolve(...) call?`);\r\n }\r\n \r\n return keys.length === 1\r\n ? currentContainer.get(keys[0])\r\n : keys.map(containerGetKey, currentContainer);\r\n}\r\n\r\nfunction containerGetKey(this: Container, key: any) {\r\n return this.get(key);\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { DependencyCtorOrFunctor, ImplOrAny, Impl, Args, DependencyCtor, DependencyFunctor } from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom Invoker for the decorated item.\r\n */\r\nexport function invoker, TArgs extends Args>(\r\n value: Invoker\r\n): (target: DependencyCtor) => void {\r\n return target => {\r\n metadata.define(metadata.invoker, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies that the decorated item should be called as a factory\r\n * function, rather than a constructor.\r\n */\r\nexport function invokeAsFactory, TArgs extends Args>(\r\n potentialTarget?: DependencyCtor\r\n): void | ((target: DependencyCtor) => void) {\r\n const deco = (target: DependencyCtor) => {\r\n metadata.define(metadata.invoker, FactoryInvoker.instance, target);\r\n };\r\n\r\n return potentialTarget ? deco(potentialTarget) : deco;\r\n}\r\n\r\n/**\r\n * A strategy for invoking a function, resulting in an object instance.\r\n */\r\nexport interface Invoker, TArgs extends Args> {\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during\r\n * invocation.\r\n * @return The result of the function invocation.\r\n */\r\n invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny;\r\n}\r\n\r\n/**\r\n * An Invoker that is used to invoke a factory method.\r\n */\r\nexport class FactoryInvoker<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > implements Invoker {\r\n /**\r\n * The singleton instance of the FactoryInvoker.\r\n */\r\n public static instance: FactoryInvoker;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny {\r\n let i = dependencies.length;\r\n const args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(dependencies[i]);\r\n }\r\n\r\n return ((fn as DependencyFunctor).apply(undefined, args as TArgs)) as ImplOrAny;\r\n }\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(staticDependencies[i]);\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return (fn as DependencyFunctor).apply(undefined, args as TArgs) as ImplOrAny;\r\n }\r\n}\r\n\r\nFactoryInvoker.instance = new FactoryInvoker();\r\n","import './internal';\r\nimport { Resolver } from './resolvers';\r\nimport { Container } from './container';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtor,\r\n Impl,\r\n Args,\r\n DependencyCtor\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom registration strategy for the decorated\r\n * class/function.\r\n */\r\nexport function registration, TArgs extends Args>(\r\n value: Registration) {\r\n return (target: DependencyCtor) => {\r\n metadata.define(metadata.registration, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"transient\"\r\n * lifetime.\r\n */\r\nexport function transient, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor) {\r\n return registration(new TransientRegistration(key));\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"singleton\"\r\n * lifetime.\r\n */\r\nexport function singleton(registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor, registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean, registerInChild: boolean = false) {\r\n return registration(\r\n new SingletonRegistration(keyOrRegisterInChild, registerInChild)\r\n );\r\n}\r\n\r\n/**\r\n * Customizes how a particular function is resolved by the Container.\r\n */\r\nexport interface Registration<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args> {\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver;\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * transients with the container.\r\n */\r\nexport class TransientRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of TransientRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(key?: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const existingResolver = container.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? container.registerTransient(\r\n (this._key || key) as string,\r\n fn as DependencyCtorOrFunctor)\r\n : existingResolver;\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * singletons with the container.\r\n */\r\nexport class SingletonRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _registerInChild: boolean;\r\n\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of SingletonRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean,\r\n registerInChild: boolean = false) {\r\n if (typeof keyOrRegisterInChild === 'boolean') {\r\n this._registerInChild = keyOrRegisterInChild;\r\n } else {\r\n this._key = keyOrRegisterInChild;\r\n this._registerInChild = registerInChild;\r\n }\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const targetContainer = this._registerInChild ? container : container.root;\r\n const existingResolver = targetContainer.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? targetContainer.register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AgD,EAAA;AAEhD,QAAA,MAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC;AAC3E,QAAA,MAAM,gBAAgB,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC;QACvE,OAAO,gBAAgB,KAAK,SAAS;AACnC,cAAE,eAAe,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,EAAE,EAAE,CAAC;cACvD,gBAAgB,CAAC;KACtB;AACF;;;;","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/dist/es2017/aurelia-dependency-injection.js.map b/dist/es2017/aurelia-dependency-injection.js.map index fcc6a08..8e907e0 100644 --- a/dist/es2017/aurelia-dependency-injection.js.map +++ b/dist/es2017/aurelia-dependency-injection.js.map @@ -1 +1 @@ -{"version":3,"file":"aurelia-dependency-injection.js","sources":["../../node_modules/tslib/tslib.es6.js","../../../src/injection.ts","../../../src/resolvers.ts","../../../src/container.ts","../../../src/invokers.ts","../../../src/registrations.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","import { metadata } from 'aurelia-metadata';\r\nimport { _emptyParameters } from './container';\r\nimport { Args, Impl, DependencyCtor } from './types';\r\n\r\n// tslint:disable-next-line:ban-types\r\nexport type Injectable = Function & { inject?: any[] | (() => any[]) };\r\n\r\nfunction isInjectable(potentialTarget: any): potentialTarget is Injectable {\r\n return !!potentialTarget;\r\n}\r\n\r\n/**\r\n * Decorator: Directs the TypeScript transpiler to write-out type metadata for\r\n * the decorated class.\r\n */\r\nexport function autoinject(\r\n potentialTarget?: TPotential\r\n): TPotential extends Injectable ? void : (target: Injectable) => void {\r\n const deco = (target: Injectable): void => {\r\n if (!target.hasOwnProperty('inject')) {\r\n target.inject = (\r\n (metadata.getOwn(metadata.paramTypes, target) as any[]) ||\r\n _emptyParameters\r\n ).slice();\r\n if (target.inject && target.inject.length > 0) {\r\n // TypeScript 3.0 metadata for \"...rest\" gives type \"Object\"\r\n // if last parameter is \"Object\", assume it's a ...rest and remove that\r\n // metadata.\r\n if (target.inject[target.inject.length - 1] === Object) {\r\n target.inject.splice(-1, 1);\r\n }\r\n }\r\n }\r\n };\r\n if (isInjectable(potentialTarget)) {\r\n return deco(potentialTarget) as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n }\r\n return deco as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n}\r\n/**\r\n * Decorator: Specifies the dependencies that should be injected by the DI Container into the decorated class/function.\r\n */\r\nexport function inject<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(...rest: TArgs[number][]): any {\r\n return (\r\n target: DependencyCtor & { inject: any },\r\n _key: any,\r\n descriptor: any) => {\r\n // handle when used as a constructor parameter decorator\r\n if (typeof descriptor === 'number') {\r\n autoinject(target);\r\n if (rest.length === 1) {\r\n target.inject[descriptor] = rest[0];\r\n }\r\n return;\r\n }\r\n // if it's true then we injecting rest into function and not Class constructor\r\n if (descriptor) {\r\n const fn = descriptor.value;\r\n fn.inject = rest;\r\n } else {\r\n target.inject = rest;\r\n }\r\n };\r\n}\r\n","import { protocol } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { autoinject } from './injection';\r\nimport type {\r\n PrimitiveOrDependencyCtor,\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n DependencyCtor,\r\n DependencyFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Indicates that the decorated class/object is a custom resolver.\r\n */\r\nexport const resolver: {\r\n decorates?: (key: any) => key is { get(container: Container, key: any): any };\r\n} & (() => any) = ((protocol as unknown) as { create(...args: any[]): any }).create(\r\n 'aurelia:resolver',\r\n (target): string | boolean => {\r\n if (!(typeof target.get === 'function')) {\r\n return 'Resolvers must implement: get(container: Container, key: any): any';\r\n }\r\n\r\n return true;\r\n }\r\n);\r\n\r\n/**\r\n * Used to allow functions/classes to specify custom dependency resolution logic.\r\n */\r\nexport interface Resolver {\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n get(container: Container, key: any): any;\r\n}\r\n\r\nexport enum Strategy {\r\n instance = 0,\r\n singleton = 1,\r\n transient = 2,\r\n function = 3,\r\n array = 4,\r\n alias = 5\r\n}\r\nexport type IStrategy = 1 | 2 | 3 | 4 | 5;\r\n\r\nexport type StrategyFunctor<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > = (\r\n container?: Container,\r\n ctor?: PrimitiveOrDependencyCtorOrFunctor,\r\n strategyResolver?: any\r\n ) => TImpl;\r\n\r\nexport interface StrategyState<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > {\r\n [Strategy.instance]: TImpl;\r\n [Strategy.singleton]: DependencyCtorOrFunctor;\r\n [Strategy.transient]: DependencyCtorOrFunctor;\r\n [Strategy.function]: StrategyFunctor;\r\n /**\r\n * For typings purposes, this is done as ({ get: StrategyFunctor } | TImpl)[]\r\n * But it should be understood, and used as [{ get: StrategyFunctor }, ...TImp[]]\r\n */\r\n [Strategy.array]: ({\r\n get: (\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor\r\n ) => TImpl\r\n } | TImpl)[];\r\n [Strategy.alias]: any;\r\n}\r\n\r\nfunction isStrategy<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TKey extends keyof StrategyState\r\n>(\r\n actual: Strategy,\r\n expected: TKey,\r\n state):\r\n state is StrategyState[TKey] {\r\n return actual === expected;\r\n}\r\n/**\r\n * Used to resolve instances, singletons, transients, aliases\r\n */\r\n@resolver()\r\nexport class StrategyResolver<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TStrategyKey extends keyof StrategyState> {\r\n\r\n public strategy: keyof StrategyState;\r\n public state: StrategyState[keyof StrategyState];\r\n\r\n /**\r\n * Creates an instance of the StrategyResolver class.\r\n * @param strategy The type of resolution strategy.\r\n * @param state The state associated with the resolution strategy.\r\n */\r\n constructor(strategy: TStrategyKey, state: StrategyState[TStrategyKey]) {\r\n this.strategy = strategy;\r\n this.state = state;\r\n }\r\n\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n public get(container: Container, key: PrimitiveOrDependencyCtor) {\r\n if (isStrategy(this.strategy, Strategy.instance, this.state)) {\r\n return this.state;\r\n }\r\n if (isStrategy(this.strategy, Strategy.singleton, this.state)) {\r\n const singleton = container.invoke(this.state);\r\n this.state = singleton;\r\n this.strategy = 0;\r\n return singleton;\r\n }\r\n if (isStrategy(this.strategy, Strategy.transient, this.state)) {\r\n return container.invoke(this.state);\r\n }\r\n if (isStrategy(this.strategy, Strategy.function, this.state)) {\r\n return this.state(container, key, this);\r\n }\r\n if (isStrategy(this.strategy, Strategy.array, this.state)) {\r\n return (this.state[0] as { get: StrategyFunctor }).get(container, key);\r\n }\r\n if (isStrategy(this.strategy, Strategy.alias, this.state)) {\r\n return container.get(this.state) as TImpl;\r\n }\r\n throw new Error('Invalid strategy: ' + this.strategy);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify lazy resolution logic.\r\n */\r\n@resolver()\r\nexport class Lazy = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'lazy';\r\n\r\n /**\r\n * Creates an instance of the Lazy class.\r\n * @param key The key to lazily resolve.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to lazily resolve the dependency into a lazy locator\r\n * function.\r\n * @param container The container to resolve from.\r\n * @return Returns a function which can be invoked at a later time to obtain\r\n * the actual dependency.\r\n */\r\n public get(container: Container): () => ImplOrAny {\r\n return () => container.get(this._key);\r\n }\r\n\r\n /**\r\n * Creates a Lazy Resolver for the supplied key.\r\n * @param key The key to lazily resolve.\r\n * @return Returns an instance of Lazy for the key.\r\n */\r\n public static of<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ) {\r\n return new Lazy(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify resolution of all matches to a key.\r\n */\r\n@resolver()\r\nexport class All = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'all';\r\n\r\n /**\r\n * Creates an instance of the All class.\r\n * @param key The key to lazily resolve all matches for.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to resolve all matching dependencies as an array of\r\n * instances.\r\n * @param container The container to resolve from.\r\n * @return Returns an array of all matching instances.\r\n */\r\n public get(container: Container): TImpl[] {\r\n return container.getAll(this._key);\r\n }\r\n\r\n /**\r\n * Creates an All Resolver for the supplied key.\r\n * @param key The key to resolve all instances for.\r\n * @return Returns an instance of All for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): All {\r\n return new All(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify an optional dependency, which will\r\n * be resolved only if already registred with the container.\r\n */\r\n@resolver()\r\nexport class Optional = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /** @internal */\r\n public _checkParent: boolean;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'optional';\r\n\r\n /**\r\n * Creates an instance of the Optional class.\r\n * @param key The key to optionally resolve for.\r\n * @param checkParent Indicates whether or not the parent container hierarchy\r\n * should be checked.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor, checkParent: boolean = true) {\r\n this._key = key;\r\n this._checkParent = checkParent;\r\n }\r\n\r\n /**\r\n * Called by the container to provide optional resolution of the key.\r\n * @param container The container to resolve from.\r\n * @return Returns the instance if found; otherwise null.\r\n */\r\n public get(container: Container): TImpl | null {\r\n if (container.hasResolver(this._key, this._checkParent)) {\r\n return container.get(this._key);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Creates an Optional Resolver for the supplied key.\r\n * @param key The key to optionally resolve for.\r\n * @param [checkParent=true] Indicates whether or not the parent container\r\n * hierarchy should be checked.\r\n * @return Returns an instance of Optional for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n checkParent: boolean = true): Optional {\r\n return new Optional(key, checkParent);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject the dependency from the parent container instead of the current\r\n * one.\r\n */\r\n@resolver()\r\nexport class Parent = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'parent';\r\n\r\n /**\r\n * Creates an instance of the Parent class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to load the dependency from the parent container\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container): TImpl | null {\r\n return container.parent ? container.parent.get(this._key) : null;\r\n }\r\n\r\n /**\r\n * Creates a Parent Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Parent for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): Parent {\r\n return new Parent(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow injecting dependencies but also passing data to the constructor.\r\n */\r\n@resolver()\r\nexport class Factory = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtorOrFunctor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'factory';\r\n\r\n /**\r\n * Creates an instance of the Factory class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to pass the dependencies to the constructor.\r\n * @param container The container to invoke the constructor with dependencies\r\n * and other parameters.\r\n * @return Returns a function that can be invoked to resolve dependencies\r\n * later, and the rest of the parameters.\r\n */\r\n public get(container: Container): DependencyFunctor {\r\n let fn = this._key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === Strategy.function) {\r\n fn = resolver.state;\r\n }\r\n\r\n return (...rest) => container.invoke(fn as DependencyCtorOrFunctor, rest);\r\n }\r\n\r\n /**\r\n * Creates a Factory Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Factory for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: DependencyCtor\r\n ): Factory {\r\n return new Factory(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject a new instance of a dependency, without regard for existing\r\n * instances in the container. Instances can optionally be registered in the\r\n * container\r\n * under a different key by supplying a key using the `as` method.\r\n */\r\n@resolver()\r\nexport class NewInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public key: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public asKey: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public dynamicDependencies: TArgs[number][];\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'newInstance';\r\n\r\n /**\r\n * Creates an instance of the NewInstance class.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor, ...dynamicDependencies: TArgs[number][]) {\r\n this.key = key;\r\n this.asKey = key;\r\n this.dynamicDependencies = dynamicDependencies;\r\n }\r\n\r\n /**\r\n * Called by the container to instantiate the dependency and potentially\r\n * register\r\n * as another key if the `as` method was used.\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container) {\r\n const dynamicDependencies =\r\n this.dynamicDependencies.length > 0\r\n ? this.dynamicDependencies.map(dependency =>\r\n dependency['protocol:aurelia:resolver']\r\n ? dependency.get(container)\r\n : container.get(dependency)\r\n )\r\n : undefined;\r\n\r\n let fn = this.key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === 3) {\r\n fn = resolver.state;\r\n }\r\n\r\n const instance = container.invoke(fn as DependencyCtorOrFunctor, dynamicDependencies);\r\n container.registerInstance(this.asKey, instance);\r\n return instance;\r\n }\r\n\r\n /**\r\n * Instructs the NewInstance resolver to register the resolved instance using\r\n * the supplied key.\r\n * @param key The key to register the instance with.\r\n * @return Returns the NewInstance resolver.\r\n */\r\n public as(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this.asKey = key;\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates an NewInstance Resolver for the supplied key.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n * @return Returns an instance of NewInstance for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtorOrFunctor,\r\n ...dynamicDependencies: TArgs[number][]): NewInstance {\r\n return new NewInstance(key, ...dynamicDependencies);\r\n }\r\n}\r\n\r\n/**\r\n * Used by parameter decorators to call autoinject for the target and retrieve\r\n * the target's inject property.\r\n * @param target The target class.\r\n * @return Returns the target's own inject property.\r\n */\r\nexport function getDecoratorDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] }\r\n ) {\r\n autoinject(target);\r\n\r\n return target.inject;\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should be lazy loaded\r\n */\r\nexport function lazy<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: { new (...args: TArgs): TBase | TImpl },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Lazy.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should load all instances of the given\r\n * key.\r\n */\r\nexport function all<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = All.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as optional\r\n */\r\nexport function optional<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n checkParentOrTarget: boolean = true) {\r\n const deco = (checkParent: boolean) => {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Optional.of(inject[index], checkParent);\r\n };\r\n };\r\n if (typeof checkParentOrTarget === 'boolean') {\r\n return deco(checkParentOrTarget);\r\n }\r\n return deco(true);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to look at the parent container for\r\n * resolution\r\n */\r\nexport function parent<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Parent.of(inject[index]);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to create a factory method, that can\r\n * accept optional arguments\r\n */\r\nexport function factory<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Factory.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as a new instance. Instances can optionally be registered in the container\r\n * under a different key and/or use dynamic dependencies\r\n */\r\nexport function newInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n asKeyOrTarget?: PrimitiveOrDependencyCtor & { inject?: TArgs[number][] },\r\n ...dynamicDependencies: TArgs[number][]\r\n) {\r\n const deco = (asKey?: typeof asKeyOrTarget) => {\r\n return (\r\n target: { new (...args: any[]): any },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = NewInstance.of(inject[index], ...dynamicDependencies);\r\n if (!!asKey) {\r\n inject[index].as(asKey);\r\n }\r\n };\r\n };\r\n if (arguments.length >= 1) {\r\n return deco(asKeyOrTarget);\r\n }\r\n return deco();\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { AggregateError } from 'aurelia-pal';\r\nimport { resolver, StrategyResolver, Resolver, Strategy, StrategyState, Factory, NewInstance, Lazy, Optional, All, Parent } from './resolvers';\r\nimport { Invoker } from './invokers';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n DependencyCtor,\r\n PrimitiveOrDependencyCtor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args,\r\n Primitive\r\n} from './types';\r\n\r\nlet currentContainer: Container | null = null;\r\n\r\nfunction validateKey(key: any) {\r\n if (key === null || key === undefined) {\r\n throw new Error(\r\n 'key/value cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport const _emptyParameters = Object.freeze([]) as [];\r\n\r\nmetadata.registration = 'aurelia:registration';\r\nmetadata.invoker = 'aurelia:invoker';\r\n\r\nconst resolverDecorates = resolver.decorates!;\r\n\r\n/**\r\n * Stores the information needed to invoke a function.\r\n */\r\nexport class InvocationHandler<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args\r\n > {\r\n /**\r\n * The function to be invoked by this handler.\r\n */\r\n public fn: DependencyCtorOrFunctor;\r\n\r\n /**\r\n * The invoker implementation that will be used to actually invoke the function.\r\n */\r\n public invoker: Invoker;\r\n\r\n /**\r\n * The statically known dependencies of this function invocation.\r\n */\r\n public dependencies: TArgs;\r\n\r\n /**\r\n * Instantiates an InvocationDescription.\r\n * @param fn The Function described by this description object.\r\n * @param invoker The strategy for invoking the function.\r\n * @param dependencies The static dependencies of the function call.\r\n */\r\n constructor(\r\n fn: DependencyCtorOrFunctor,\r\n invoker: Invoker,\r\n dependencies: TArgs\r\n ) {\r\n this.fn = fn;\r\n this.invoker = invoker;\r\n this.dependencies = dependencies;\r\n }\r\n\r\n /**\r\n * Invokes the function.\r\n * @param container The calling container.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(container: Container, dynamicDependencies?: TArgs[]): TImpl {\r\n const previousContainer = currentContainer;\r\n currentContainer = container;\r\n try {\r\n return dynamicDependencies !== undefined\r\n ? this.invoker.invokeWithDynamicDependencies(\r\n container,\r\n this.fn,\r\n this.dependencies,\r\n dynamicDependencies\r\n )\r\n : this.invoker.invoke(container, this.fn, this.dependencies);\r\n } finally {\r\n currentContainer = previousContainer;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Used to configure a Container instance.\r\n */\r\nexport interface ContainerConfiguration {\r\n /**\r\n * An optional callback which will be called when any function needs an\r\n * InvocationHandler created (called once per Function).\r\n */\r\n onHandlerCreated?: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n handlers?: Map;\r\n}\r\n\r\nfunction invokeWithDynamicDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n) {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n let lookup;\r\n\r\n while (i--) {\r\n lookup = staticDependencies[i];\r\n\r\n if (lookup === null || lookup === undefined) {\r\n throw new Error(\r\n 'Constructor Parameter with index ' +\r\n i +\r\n ' cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n } else {\r\n args[i] = container.get(lookup);\r\n }\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return Reflect.construct(fn, args);\r\n}\r\n\r\nconst classInvoker: Invoker = {\r\n invoke(container, Type: DependencyCtor, deps) {\r\n const instances = deps.map((dep) => container.get(dep));\r\n return Reflect.construct(Type, instances);\r\n },\r\n invokeWithDynamicDependencies\r\n};\r\n\r\nfunction getDependencies(f) {\r\n if (!f.hasOwnProperty('inject')) {\r\n return [];\r\n }\r\n\r\n if (typeof f.inject === 'function') {\r\n return f.inject();\r\n }\r\n\r\n return f.inject;\r\n}\r\n\r\n/**\r\n * A lightweight, extensible dependency injection container.\r\n */\r\nexport class Container {\r\n /**\r\n * The global root Container instance. Available if makeGlobal() has been\r\n * called. Aurelia Framework calls makeGlobal().\r\n */\r\n public static instance: Container;\r\n\r\n /**\r\n * The parent container in the DI hierarchy.\r\n */\r\n public parent: Container | null;\r\n\r\n /**\r\n * The root container in the DI hierarchy.\r\n */\r\n public root: Container;\r\n\r\n /** @internal */\r\n public _configuration: ContainerConfiguration;\r\n\r\n /** @internal */\r\n public _onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n /** @internal */\r\n public _handlers: Map;\r\n\r\n /** @internal */\r\n public _resolvers: Map;\r\n\r\n /**\r\n * Creates an instance of Container.\r\n * @param configuration Provides some configuration for the new Container instance.\r\n */\r\n constructor(configuration?: ContainerConfiguration) {\r\n if (configuration === undefined) {\r\n configuration = {};\r\n }\r\n\r\n this._configuration = configuration;\r\n this._onHandlerCreated = configuration.onHandlerCreated!;\r\n this._handlers =\r\n configuration.handlers || (configuration.handlers = new Map());\r\n this._resolvers = new Map();\r\n this.root = this;\r\n this.parent = null;\r\n }\r\n\r\n /**\r\n * Makes this container instance globally reachable through Container.instance.\r\n */\r\n public makeGlobal(): Container {\r\n Container.instance = this;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets an invocation handler creation callback that will be called when new\r\n * InvocationsHandlers are created (called once per Function).\r\n * @param onHandlerCreated The callback to be called when an\r\n * InvocationsHandler is created.\r\n */\r\n public setHandlerCreatedCallback<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler\r\n ) {\r\n this._onHandlerCreated = onHandlerCreated;\r\n this._configuration.onHandlerCreated = onHandlerCreated;\r\n }\r\n\r\n /**\r\n * Registers an existing object instance with the container.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param instance The instance that will be resolved when the key is matched.\r\n * This defaults to the key value when instance is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerInstance = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n instance?: TImpl): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(0, instance === undefined ? key : instance)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container always\r\n * returns the same instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.singleton, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container returns a\r\n * new instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(2, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param handler The resolution function to use when the dependency is\r\n * needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerHandler = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n handler: (container?: Container, key?: PrimitiveOrDependencyCtor, resolver?: Resolver) => any\r\n ): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.function, handler)\r\n );\r\n }\r\n\r\n /**\r\n * Registers an additional key that serves as an alias to the original DI key.\r\n * @param originalKey The key that originally identified the dependency; usually a constructor function.\r\n * @param aliasKey An alternate key which can also be used to resolve the same dependency as the original.\r\n * @return The resolver that was registered.\r\n */\r\n public registerAlias = Impl, TArgs extends Args = Args>(\r\n originalKey: PrimitiveOrDependencyCtor,\r\n aliasKey: PrimitiveOrDependencyCtor): Resolver {\r\n return this.registerResolver(\r\n aliasKey,\r\n new StrategyResolver(5, originalKey)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param resolver The resolver to use when the dependency is needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n resolver: Resolver\r\n ): Resolver {\r\n validateKey(key);\r\n\r\n const allResolvers = this._resolvers;\r\n const result = allResolvers.get(key);\r\n\r\n if (result === undefined) {\r\n allResolvers.set(key, resolver);\r\n } else if (result.strategy === 4) {\r\n result.state.push(resolver);\r\n } else {\r\n allResolvers.set(key, new StrategyResolver(4, [result, resolver]));\r\n }\r\n\r\n return resolver;\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) by inspecting its registration\r\n * annotations. If none are found, then the default singleton registration is\r\n * used.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n */\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n fn = fn === undefined ? key as DependencyCtor : fn;\r\n\r\n if (typeof fn === 'function') {\r\n const registration = metadata.get(metadata.registration, fn);\r\n\r\n if (registration === undefined) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn));\r\n }\r\n\r\n return registration.registerResolver(this, key, fn);\r\n }\r\n\r\n return this.registerResolver(key, new StrategyResolver(0, fn));\r\n }\r\n\r\n /**\r\n * Registers an array of types (constructor functions) by inspecting their\r\n * registration annotations. If none are found, then the default singleton\r\n * registration is used.\r\n * @param fns The constructor function to use when the dependency needs to be instantiated.\r\n */\r\n public autoRegisterAll(fns: DependencyCtor[]): void {\r\n let i = fns.length;\r\n while (i--) {\r\n this.autoRegister(fns[i]);\r\n }\r\n }\r\n\r\n /**\r\n * Unregisters based on key.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n */\r\n public unregister(key: any): void {\r\n this._resolvers.delete(key);\r\n }\r\n\r\n /**\r\n * Inspects the container to determine if a particular key has been registred.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @param checkParent Indicates whether or not to check the parent container hierarchy.\r\n * @return Returns true if the key has been registred; false otherwise.\r\n */\r\n public hasResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, checkParent: boolean = false): boolean {\r\n validateKey(key);\r\n\r\n return (\r\n this._resolvers.has(key) ||\r\n (checkParent &&\r\n this.parent !== null &&\r\n this.parent.hasResolver(key, checkParent))\r\n );\r\n }\r\n\r\n /**\r\n * Gets the resolver for the particular key, if it has been registered.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @return Returns the resolver, if registred, otherwise undefined.\r\n */\r\n public getResolver<\r\n TStrategyKey extends keyof StrategyState,\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n >(\r\n key: PrimitiveOrDependencyCtorOrFunctor\r\n ): StrategyResolver {\r\n return this._resolvers.get(key);\r\n }\r\n\r\n /**\r\n * Resolves a single instance based on the provided key.\r\n * @param key The key that identifies the object to resolve.\r\n * @return Returns the resolved instance.\r\n */\r\n public get | Lazy | Factory | Optional | Parent | All>(\r\n key: TResolver): ResolvedValue;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: typeof Container): Container;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor | typeof Container): ImplOrAny | Container {\r\n validateKey(key);\r\n\r\n if (key === Container) {\r\n return this;\r\n }\r\n\r\n if (resolverDecorates(key)) {\r\n return key.get(this, key);\r\n }\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key as DependencyCtor).get(this, key);\r\n }\r\n\r\n const registration = metadata.get(metadata.registration, key);\r\n\r\n if (registration === undefined) {\r\n return this.parent._get(key);\r\n }\r\n\r\n return registration.registerResolver(\r\n this, key, key as DependencyCtorOrFunctor).get(this, key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n public _get(key) {\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n\r\n return this.parent._get(key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n /**\r\n * Resolves all instance registered under the provided key.\r\n * @param key The key that identifies the objects to resolve.\r\n * @return Returns an array of the resolved instances.\r\n */\r\n public getAll = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny[] {\r\n validateKey(key);\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return _emptyParameters;\r\n }\r\n\r\n return this.parent.getAll(key);\r\n }\r\n\r\n if (resolver.strategy === 4) {\r\n const state = resolver.state;\r\n let i = state.length;\r\n const results = new Array(i);\r\n\r\n while (i--) {\r\n results[i] = state[i].get(this, key);\r\n }\r\n\r\n return results;\r\n }\r\n\r\n return [resolver.get(this, key)];\r\n }\r\n\r\n /**\r\n * Creates a new dependency injection container whose parent is the current container.\r\n * @return Returns a new container instance parented to this.\r\n */\r\n public createChild(): Container {\r\n const child = new Container(this._configuration);\r\n child.root = this.root;\r\n child.parent = this;\r\n return child;\r\n }\r\n\r\n /**\r\n * Invokes a function, recursively resolving its dependencies.\r\n * @param fn The function to invoke with the auto-resolved dependencies.\r\n * @param dynamicDependencies Additional function dependencies to use during invocation.\r\n * @return Returns the instance resulting from calling the function.\r\n */\r\n public invoke = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor,\r\n dynamicDependencies?: TArgs[number][]\r\n ): ImplOrAny {\r\n try {\r\n let handler = this._handlers.get(fn);\r\n\r\n if (handler === undefined) {\r\n handler = this._createInvocationHandler(fn);\r\n this._handlers.set(fn, handler);\r\n }\r\n\r\n return handler.invoke(this, dynamicDependencies);\r\n } catch (e) {\r\n // @ts-expect-error AggregateError returns an Error in its type hence it fails (new ...) but it's fine\r\n throw new AggregateError(\r\n `Error invoking ${fn.name}. Check the inner error for details.`,\r\n e as Error | undefined,\r\n true\r\n );\r\n }\r\n }\r\n\r\n public _createInvocationHandler\r\n = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor & { inject?: any; }\r\n ): InvocationHandler {\r\n let dependencies;\r\n\r\n if (fn.inject === undefined) {\r\n dependencies =\r\n metadata.getOwn(metadata.paramTypes, fn) || _emptyParameters;\r\n } else {\r\n dependencies = [];\r\n let ctor = fn;\r\n while (typeof ctor === 'function') {\r\n dependencies.push(...getDependencies(ctor));\r\n ctor = Object.getPrototypeOf(ctor);\r\n }\r\n }\r\n\r\n const invoker = metadata.getOwn(metadata.invoker, fn) || classInvoker;\r\n\r\n const handler = new InvocationHandler(fn, invoker, dependencies);\r\n return this._onHandlerCreated !== undefined\r\n ? this._onHandlerCreated(handler)\r\n : handler;\r\n }\r\n}\r\n\r\nexport type ResolvedValue =\r\n T extends { new (...args: any[]): infer R }\r\n ? R\r\n : T extends Factory\r\n ? (...args: unknown[]) => R\r\n : T extends Lazy\r\n ? () => R\r\n : T extends NewInstance\r\n ? R\r\n : T extends Optional\r\n ? R | null\r\n : T extends All\r\n ? R[]\r\n : T extends Parent\r\n ? R | null\r\n : T extends [infer T1, ...infer T2]\r\n ? [ResolvedValue, ...ResolvedValue]\r\n : T;\r\n\r\n/**\r\n * Resolve a key, or list of keys based on the current container.\r\n * \r\n * @example\r\n * ```ts\r\n * import { resolve } from 'aurelia-framework';\r\n * // or\r\n * // import { Container, resolve } from 'aurelia-dependency-injection';\r\n * \r\n * class MyCustomElement {\r\n * someService = resolve(MyService);\r\n * }\r\n * ```\r\n */\r\nexport function resolve(key: K): ResolvedValue;\r\nexport function resolve(...keys: K): ResolvedValue\r\nexport function resolve(...keys: K) {\r\n if (currentContainer == null) {\r\n throw new Error(`There is not a currently active container to resolve \"${String(keys)}\". Are you trying to \"new SomeClass(...)\" that has a resolve(...) call?`);\r\n }\r\n \r\n return keys.length === 1\r\n ? currentContainer.get(keys[0])\r\n : keys.map(containerGetKey, currentContainer);\r\n}\r\n\r\nfunction containerGetKey(this: Container, key: any) {\r\n return this.get(key);\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { DependencyCtorOrFunctor, ImplOrAny, Impl, Args, DependencyCtor, DependencyFunctor } from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom Invoker for the decorated item.\r\n */\r\nexport function invoker, TArgs extends Args>(\r\n value: Invoker\r\n): (target: DependencyCtor) => void {\r\n return target => {\r\n metadata.define(metadata.invoker, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies that the decorated item should be called as a factory\r\n * function, rather than a constructor.\r\n */\r\nexport function invokeAsFactory, TArgs extends Args>(\r\n potentialTarget?: DependencyCtor\r\n): void | ((target: DependencyCtor) => void) {\r\n const deco = (target: DependencyCtor) => {\r\n metadata.define(metadata.invoker, FactoryInvoker.instance, target);\r\n };\r\n\r\n return potentialTarget ? deco(potentialTarget) : deco;\r\n}\r\n\r\n/**\r\n * A strategy for invoking a function, resulting in an object instance.\r\n */\r\nexport interface Invoker, TArgs extends Args> {\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during\r\n * invocation.\r\n * @return The result of the function invocation.\r\n */\r\n invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny;\r\n}\r\n\r\n/**\r\n * An Invoker that is used to invoke a factory method.\r\n */\r\nexport class FactoryInvoker<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > implements Invoker {\r\n /**\r\n * The singleton instance of the FactoryInvoker.\r\n */\r\n public static instance: FactoryInvoker;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny {\r\n let i = dependencies.length;\r\n const args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(dependencies[i]);\r\n }\r\n\r\n return ((fn as DependencyFunctor).apply(undefined, args as TArgs)) as ImplOrAny;\r\n }\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(staticDependencies[i]);\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return (fn as DependencyFunctor).apply(undefined, args as TArgs) as ImplOrAny;\r\n }\r\n}\r\n\r\nFactoryInvoker.instance = new FactoryInvoker();\r\n","import './internal';\r\nimport { Resolver } from './resolvers';\r\nimport { Container } from './container';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtor,\r\n Impl,\r\n Args,\r\n DependencyCtor\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom registration strategy for the decorated\r\n * class/function.\r\n */\r\nexport function registration, TArgs extends Args>(\r\n value: Registration) {\r\n return (target: DependencyCtor) => {\r\n metadata.define(metadata.registration, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"transient\"\r\n * lifetime.\r\n */\r\nexport function transient, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor) {\r\n return registration(new TransientRegistration(key));\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"singleton\"\r\n * lifetime.\r\n */\r\nexport function singleton(registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor, registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean, registerInChild: boolean = false) {\r\n return registration(\r\n new SingletonRegistration(keyOrRegisterInChild, registerInChild)\r\n );\r\n}\r\n\r\n/**\r\n * Customizes how a particular function is resolved by the Container.\r\n */\r\nexport interface Registration<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args> {\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver;\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * transients with the container.\r\n */\r\nexport class TransientRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of TransientRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(key?: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const existingResolver = container.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? container.registerTransient(\r\n (this._key || key) as string,\r\n fn as DependencyCtorOrFunctor)\r\n : existingResolver;\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * singletons with the container.\r\n */\r\nexport class SingletonRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _registerInChild: boolean;\r\n\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of SingletonRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean,\r\n registerInChild: boolean = false) {\r\n if (typeof keyOrRegisterInChild === 'boolean') {\r\n this._registerInChild = keyOrRegisterInChild;\r\n } else {\r\n this._key = keyOrRegisterInChild;\r\n this._registerInChild = registerInChild;\r\n }\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const targetContainer = this._registerInChild ? container : container.root;\r\n const existingResolver = targetContainer.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? targetContainer.registerSingleton(this._key || key, fn)\r\n : existingResolver;\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAsCA;AACO,SAAS,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EA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BAAgB,KAAK,SAAS;AACnC,cAAE,eAAe,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,EAAE,EAAE,CAAC;cACvD,gBAAgB,CAAC;KACtB;AACF;;;;","x_google_ignoreList":[0]} \ No newline at end of file +{"version":3,"file":"aurelia-dependency-injection.js","sources":["../../node_modules/tslib/tslib.es6.js","../../../src/injection.ts","../../../src/resolvers.ts","../../../src/container.ts","../../../src/invokers.ts","../../../src/registrations.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","import { metadata } from 'aurelia-metadata';\r\nimport { _emptyParameters } from './container';\r\nimport { Args, Impl, DependencyCtor } from './types';\r\n\r\n// tslint:disable-next-line:ban-types\r\nexport type Injectable = Function & { inject?: any[] | (() => any[]) };\r\n\r\nfunction isInjectable(potentialTarget: any): potentialTarget is Injectable {\r\n return !!potentialTarget;\r\n}\r\n\r\n/**\r\n * Decorator: Directs the TypeScript transpiler to write-out type metadata for\r\n * the decorated class.\r\n */\r\nexport function autoinject(\r\n potentialTarget?: TPotential\r\n): TPotential extends Injectable ? void : (target: Injectable) => void {\r\n const deco = (target: Injectable): void => {\r\n if (!target.hasOwnProperty('inject')) {\r\n target.inject = (\r\n (metadata.getOwn(metadata.paramTypes, target) as any[]) ||\r\n _emptyParameters\r\n ).slice();\r\n if (target.inject && target.inject.length > 0) {\r\n // TypeScript 3.0 metadata for \"...rest\" gives type \"Object\"\r\n // if last parameter is \"Object\", assume it's a ...rest and remove that\r\n // metadata.\r\n if (target.inject[target.inject.length - 1] === Object) {\r\n target.inject.splice(-1, 1);\r\n }\r\n }\r\n }\r\n };\r\n if (isInjectable(potentialTarget)) {\r\n return deco(potentialTarget) as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n }\r\n return deco as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n}\r\n/**\r\n * Decorator: Specifies the dependencies that should be injected by the DI Container into the decorated class/function.\r\n */\r\nexport function inject<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(...rest: TArgs[number][]): any {\r\n return (\r\n target: DependencyCtor & { inject: any },\r\n _key: any,\r\n descriptor: any) => {\r\n // handle when used as a constructor parameter decorator\r\n if (typeof descriptor === 'number') {\r\n autoinject(target);\r\n if (rest.length === 1) {\r\n target.inject[descriptor] = rest[0];\r\n }\r\n return;\r\n }\r\n // if it's true then we injecting rest into function and not Class constructor\r\n if (descriptor) {\r\n const fn = descriptor.value;\r\n fn.inject = rest;\r\n } else {\r\n target.inject = rest;\r\n }\r\n };\r\n}\r\n","import { protocol } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { autoinject } from './injection';\r\nimport type {\r\n PrimitiveOrDependencyCtor,\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n DependencyCtor,\r\n DependencyFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Indicates that the decorated class/object is a custom resolver.\r\n */\r\nexport const resolver: {\r\n decorates?: (key: any) => key is { get(container: Container, key: any): any };\r\n} & (() => any) = ((protocol as unknown) as { create(...args: any[]): any }).create(\r\n 'aurelia:resolver',\r\n (target): string | boolean => {\r\n if (!(typeof target.get === 'function')) {\r\n return 'Resolvers must implement: get(container: Container, key: any): any';\r\n }\r\n\r\n return true;\r\n }\r\n);\r\n\r\n/**\r\n * Used to allow functions/classes to specify custom dependency resolution logic.\r\n */\r\nexport interface Resolver {\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n get(container: Container, key: any): any;\r\n}\r\n\r\nexport enum Strategy {\r\n instance = 0,\r\n singleton = 1,\r\n transient = 2,\r\n function = 3,\r\n array = 4,\r\n alias = 5\r\n}\r\nexport type IStrategy = 1 | 2 | 3 | 4 | 5;\r\n\r\nexport type StrategyFunctor<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > = (\r\n container?: Container,\r\n ctor?: PrimitiveOrDependencyCtorOrFunctor,\r\n strategyResolver?: any\r\n ) => TImpl;\r\n\r\nexport interface StrategyState<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > {\r\n [Strategy.instance]: TImpl;\r\n [Strategy.singleton]: DependencyCtorOrFunctor;\r\n [Strategy.transient]: DependencyCtorOrFunctor;\r\n [Strategy.function]: StrategyFunctor;\r\n /**\r\n * For typings purposes, this is done as ({ get: StrategyFunctor } | TImpl)[]\r\n * But it should be understood, and used as [{ get: StrategyFunctor }, ...TImp[]]\r\n */\r\n [Strategy.array]: ({\r\n get: (\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor\r\n ) => TImpl\r\n } | TImpl)[];\r\n [Strategy.alias]: any;\r\n}\r\n\r\nfunction isStrategy<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TKey extends keyof StrategyState\r\n>(\r\n actual: Strategy,\r\n expected: TKey,\r\n state):\r\n state is StrategyState[TKey] {\r\n return actual === expected;\r\n}\r\n/**\r\n * Used to resolve instances, singletons, transients, aliases\r\n */\r\n@resolver()\r\nexport class StrategyResolver<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TStrategyKey extends keyof StrategyState> {\r\n\r\n public strategy: keyof StrategyState;\r\n public state: StrategyState[keyof StrategyState];\r\n\r\n /**\r\n * Creates an instance of the StrategyResolver class.\r\n * @param strategy The type of resolution strategy.\r\n * @param state The state associated with the resolution strategy.\r\n */\r\n constructor(strategy: TStrategyKey, state: StrategyState[TStrategyKey]) {\r\n this.strategy = strategy;\r\n this.state = state;\r\n }\r\n\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n public get(container: Container, key: PrimitiveOrDependencyCtor) {\r\n if (isStrategy(this.strategy, Strategy.instance, this.state)) {\r\n return this.state;\r\n }\r\n if (isStrategy(this.strategy, Strategy.singleton, this.state)) {\r\n const singleton = container.invoke(this.state);\r\n this.state = singleton;\r\n this.strategy = 0;\r\n return singleton;\r\n }\r\n if (isStrategy(this.strategy, Strategy.transient, this.state)) {\r\n return container.invoke(this.state);\r\n }\r\n if (isStrategy(this.strategy, Strategy.function, this.state)) {\r\n return this.state(container, key, this);\r\n }\r\n if (isStrategy(this.strategy, Strategy.array, this.state)) {\r\n return (this.state[0] as { get: StrategyFunctor }).get(container, key);\r\n }\r\n if (isStrategy(this.strategy, Strategy.alias, this.state)) {\r\n return container.get(this.state) as TImpl;\r\n }\r\n throw new Error('Invalid strategy: ' + this.strategy);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify lazy resolution logic.\r\n */\r\n@resolver()\r\nexport class Lazy = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'lazy';\r\n\r\n /**\r\n * Creates an instance of the Lazy class.\r\n * @param key The key to lazily resolve.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to lazily resolve the dependency into a lazy locator\r\n * function.\r\n * @param container The container to resolve from.\r\n * @return Returns a function which can be invoked at a later time to obtain\r\n * the actual dependency.\r\n */\r\n public get(container: Container): () => ImplOrAny {\r\n return () => container.get(this._key);\r\n }\r\n\r\n /**\r\n * Creates a Lazy Resolver for the supplied key.\r\n * @param key The key to lazily resolve.\r\n * @return Returns an instance of Lazy for the key.\r\n */\r\n public static of<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ) {\r\n return new Lazy(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify resolution of all matches to a key.\r\n */\r\n@resolver()\r\nexport class All = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'all';\r\n\r\n /**\r\n * Creates an instance of the All class.\r\n * @param key The key to lazily resolve all matches for.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to resolve all matching dependencies as an array of\r\n * instances.\r\n * @param container The container to resolve from.\r\n * @return Returns an array of all matching instances.\r\n */\r\n public get(container: Container): TImpl[] {\r\n return container.getAll(this._key);\r\n }\r\n\r\n /**\r\n * Creates an All Resolver for the supplied key.\r\n * @param key The key to resolve all instances for.\r\n * @return Returns an instance of All for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): All {\r\n return new All(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify an optional dependency, which will\r\n * be resolved only if already registred with the container.\r\n */\r\n@resolver()\r\nexport class Optional = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /** @internal */\r\n public _checkParent: boolean;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'optional';\r\n\r\n /**\r\n * Creates an instance of the Optional class.\r\n * @param key The key to optionally resolve for.\r\n * @param checkParent Indicates whether or not the parent container hierarchy\r\n * should be checked.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor, checkParent: boolean = true) {\r\n this._key = key;\r\n this._checkParent = checkParent;\r\n }\r\n\r\n /**\r\n * Called by the container to provide optional resolution of the key.\r\n * @param container The container to resolve from.\r\n * @return Returns the instance if found; otherwise null.\r\n */\r\n public get(container: Container): TImpl | null {\r\n if (container.hasResolver(this._key, this._checkParent)) {\r\n return container.get(this._key);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Creates an Optional Resolver for the supplied key.\r\n * @param key The key to optionally resolve for.\r\n * @param [checkParent=true] Indicates whether or not the parent container\r\n * hierarchy should be checked.\r\n * @return Returns an instance of Optional for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n checkParent: boolean = true): Optional {\r\n return new Optional(key, checkParent);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject the dependency from the parent container instead of the current\r\n * one.\r\n */\r\n@resolver()\r\nexport class Parent = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'parent';\r\n\r\n /**\r\n * Creates an instance of the Parent class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to load the dependency from the parent container\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container): TImpl | null {\r\n return container.parent ? container.parent.get(this._key) : null;\r\n }\r\n\r\n /**\r\n * Creates a Parent Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Parent for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): Parent {\r\n return new Parent(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow injecting dependencies but also passing data to the constructor.\r\n */\r\n@resolver()\r\nexport class Factory = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtorOrFunctor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'factory';\r\n\r\n /**\r\n * Creates an instance of the Factory class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to pass the dependencies to the constructor.\r\n * @param container The container to invoke the constructor with dependencies\r\n * and other parameters.\r\n * @return Returns a function that can be invoked to resolve dependencies\r\n * later, and the rest of the parameters.\r\n */\r\n public get(container: Container): DependencyFunctor {\r\n let fn = this._key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === Strategy.function) {\r\n fn = resolver.state;\r\n }\r\n\r\n return (...rest) => container.invoke(fn as DependencyCtorOrFunctor, rest);\r\n }\r\n\r\n /**\r\n * Creates a Factory Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Factory for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: DependencyCtor\r\n ): Factory {\r\n return new Factory(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject a new instance of a dependency, without regard for existing\r\n * instances in the container. Instances can optionally be registered in the\r\n * container\r\n * under a different key by supplying a key using the `as` method.\r\n */\r\n@resolver()\r\nexport class NewInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public key: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public asKey: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public dynamicDependencies: TArgs[number][];\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'newInstance';\r\n\r\n /**\r\n * Creates an instance of the NewInstance class.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor, ...dynamicDependencies: TArgs[number][]) {\r\n this.key = key;\r\n this.asKey = key;\r\n this.dynamicDependencies = dynamicDependencies;\r\n }\r\n\r\n /**\r\n * Called by the container to instantiate the dependency and potentially\r\n * register\r\n * as another key if the `as` method was used.\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container) {\r\n const dynamicDependencies =\r\n this.dynamicDependencies.length > 0\r\n ? this.dynamicDependencies.map(dependency =>\r\n dependency['protocol:aurelia:resolver']\r\n ? dependency.get(container)\r\n : container.get(dependency)\r\n )\r\n : undefined;\r\n\r\n let fn = this.key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === 3) {\r\n fn = resolver.state;\r\n }\r\n\r\n const instance = container.invoke(fn as DependencyCtorOrFunctor, dynamicDependencies);\r\n container.registerInstance(this.asKey, instance);\r\n return instance;\r\n }\r\n\r\n /**\r\n * Instructs the NewInstance resolver to register the resolved instance using\r\n * the supplied key.\r\n * @param key The key to register the instance with.\r\n * @return Returns the NewInstance resolver.\r\n */\r\n public as(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this.asKey = key;\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates an NewInstance Resolver for the supplied key.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n * @return Returns an instance of NewInstance for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtorOrFunctor,\r\n ...dynamicDependencies: TArgs[number][]): NewInstance {\r\n return new NewInstance(key, ...dynamicDependencies);\r\n }\r\n}\r\n\r\n/**\r\n * Used by parameter decorators to call autoinject for the target and retrieve\r\n * the target's inject property.\r\n * @param target The target class.\r\n * @return Returns the target's own inject property.\r\n */\r\nexport function getDecoratorDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] }\r\n ) {\r\n autoinject(target);\r\n\r\n return target.inject;\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should be lazy loaded\r\n */\r\nexport function lazy<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: { new (...args: TArgs): TBase | TImpl },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Lazy.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should load all instances of the given\r\n * key.\r\n */\r\nexport function all<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = All.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as optional\r\n */\r\nexport function optional<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n checkParentOrTarget: boolean = true) {\r\n const deco = (checkParent: boolean) => {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Optional.of(inject[index], checkParent);\r\n };\r\n };\r\n if (typeof checkParentOrTarget === 'boolean') {\r\n return deco(checkParentOrTarget);\r\n }\r\n return deco(true);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to look at the parent container for\r\n * resolution\r\n */\r\nexport function parent<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Parent.of(inject[index]);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to create a factory method, that can\r\n * accept optional arguments\r\n */\r\nexport function factory<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Factory.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as a new instance. Instances can optionally be registered in the container\r\n * under a different key and/or use dynamic dependencies\r\n */\r\nexport function newInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n asKeyOrTarget?: PrimitiveOrDependencyCtor & { inject?: TArgs[number][] },\r\n ...dynamicDependencies: TArgs[number][]\r\n) {\r\n const deco = (asKey?: typeof asKeyOrTarget) => {\r\n return (\r\n target: { new (...args: any[]): any },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = NewInstance.of(inject[index], ...dynamicDependencies);\r\n if (!!asKey) {\r\n inject[index].as(asKey);\r\n }\r\n };\r\n };\r\n if (arguments.length >= 1) {\r\n return deco(asKeyOrTarget);\r\n }\r\n return deco();\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { AggregateError } from 'aurelia-pal';\r\nimport { resolver, StrategyResolver, Resolver, Strategy, StrategyState, Factory, NewInstance, Lazy, Optional, All, Parent } from './resolvers';\r\nimport { Invoker } from './invokers';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n DependencyCtor,\r\n PrimitiveOrDependencyCtor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args,\r\n Primitive\r\n} from './types';\r\n\r\nlet currentContainer: Container | null = null;\r\n\r\nfunction validateKey(key: any) {\r\n if (key === null || key === undefined) {\r\n throw new Error(\r\n 'key/value cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport const _emptyParameters = Object.freeze([]) as [];\r\n\r\nmetadata.registration = 'aurelia:registration';\r\nmetadata.invoker = 'aurelia:invoker';\r\n\r\nconst resolverDecorates = resolver.decorates!;\r\n\r\n/**\r\n * Stores the information needed to invoke a function.\r\n */\r\nexport class InvocationHandler<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args\r\n > {\r\n /**\r\n * The function to be invoked by this handler.\r\n */\r\n public fn: DependencyCtorOrFunctor;\r\n\r\n /**\r\n * The invoker implementation that will be used to actually invoke the function.\r\n */\r\n public invoker: Invoker;\r\n\r\n /**\r\n * The statically known dependencies of this function invocation.\r\n */\r\n public dependencies: TArgs;\r\n\r\n /**\r\n * Instantiates an InvocationDescription.\r\n * @param fn The Function described by this description object.\r\n * @param invoker The strategy for invoking the function.\r\n * @param dependencies The static dependencies of the function call.\r\n */\r\n constructor(\r\n fn: DependencyCtorOrFunctor,\r\n invoker: Invoker,\r\n dependencies: TArgs\r\n ) {\r\n this.fn = fn;\r\n this.invoker = invoker;\r\n this.dependencies = dependencies;\r\n }\r\n\r\n /**\r\n * Invokes the function.\r\n * @param container The calling container.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(container: Container, dynamicDependencies?: TArgs[]): TImpl {\r\n const previousContainer = currentContainer;\r\n currentContainer = container;\r\n try {\r\n return dynamicDependencies !== undefined\r\n ? this.invoker.invokeWithDynamicDependencies(\r\n container,\r\n this.fn,\r\n this.dependencies,\r\n dynamicDependencies\r\n )\r\n : this.invoker.invoke(container, this.fn, this.dependencies);\r\n } finally {\r\n currentContainer = previousContainer;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Used to configure a Container instance.\r\n */\r\nexport interface ContainerConfiguration {\r\n /**\r\n * An optional callback which will be called when any function needs an\r\n * InvocationHandler created (called once per Function).\r\n */\r\n onHandlerCreated?: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n handlers?: Map;\r\n}\r\n\r\nfunction invokeWithDynamicDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n) {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n let lookup;\r\n\r\n while (i--) {\r\n lookup = staticDependencies[i];\r\n\r\n if (lookup === null || lookup === undefined) {\r\n throw new Error(\r\n 'Constructor Parameter with index ' +\r\n i +\r\n ' cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n } else {\r\n args[i] = container.get(lookup);\r\n }\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return Reflect.construct(fn, args);\r\n}\r\n\r\nconst classInvoker: Invoker = {\r\n invoke(container, Type: DependencyCtor, deps) {\r\n const instances = deps.map((dep) => container.get(dep));\r\n return Reflect.construct(Type, instances);\r\n },\r\n invokeWithDynamicDependencies\r\n};\r\n\r\nfunction getDependencies(f) {\r\n if (!f.hasOwnProperty('inject')) {\r\n return [];\r\n }\r\n\r\n if (typeof f.inject === 'function') {\r\n return f.inject();\r\n }\r\n\r\n return f.inject;\r\n}\r\n\r\n/**\r\n * A lightweight, extensible dependency injection container.\r\n */\r\nexport class Container {\r\n /**\r\n * The global root Container instance. Available if makeGlobal() has been\r\n * called. Aurelia Framework calls makeGlobal().\r\n */\r\n public static instance: Container;\r\n\r\n /**\r\n * The parent container in the DI hierarchy.\r\n */\r\n public parent: Container | null;\r\n\r\n /**\r\n * The root container in the DI hierarchy.\r\n */\r\n public root: Container;\r\n\r\n /** @internal */\r\n public _configuration: ContainerConfiguration;\r\n\r\n /** @internal */\r\n public _onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n /** @internal */\r\n public _handlers: Map;\r\n\r\n /** @internal */\r\n public _resolvers: Map;\r\n\r\n /**\r\n * Creates an instance of Container.\r\n * @param configuration Provides some configuration for the new Container instance.\r\n */\r\n constructor(configuration?: ContainerConfiguration) {\r\n if (configuration === undefined) {\r\n configuration = {};\r\n }\r\n\r\n this._configuration = configuration;\r\n this._onHandlerCreated = configuration.onHandlerCreated!;\r\n this._handlers =\r\n configuration.handlers || (configuration.handlers = new Map());\r\n this._resolvers = new Map();\r\n this.root = this;\r\n this.parent = null;\r\n }\r\n\r\n /**\r\n * Makes this container instance globally reachable through Container.instance.\r\n */\r\n public makeGlobal(): Container {\r\n Container.instance = this;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets an invocation handler creation callback that will be called when new\r\n * InvocationsHandlers are created (called once per Function).\r\n * @param onHandlerCreated The callback to be called when an\r\n * InvocationsHandler is created.\r\n */\r\n public setHandlerCreatedCallback<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler\r\n ) {\r\n this._onHandlerCreated = onHandlerCreated;\r\n this._configuration.onHandlerCreated = onHandlerCreated;\r\n }\r\n\r\n /**\r\n * Registers an existing object instance with the container.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param instance The instance that will be resolved when the key is matched.\r\n * This defaults to the key value when instance is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerInstance = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n instance?: TImpl): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(0, instance === undefined ? key : instance)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container always\r\n * returns the same instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.singleton, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container returns a\r\n * new instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(2, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param handler The resolution function to use when the dependency is\r\n * needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerHandler = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n handler: (container?: Container, key?: PrimitiveOrDependencyCtor, resolver?: Resolver) => any\r\n ): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.function, handler)\r\n );\r\n }\r\n\r\n /**\r\n * Registers an additional key that serves as an alias to the original DI key.\r\n * @param originalKey The key that originally identified the dependency; usually a constructor function.\r\n * @param aliasKey An alternate key which can also be used to resolve the same dependency as the original.\r\n * @return The resolver that was registered.\r\n */\r\n public registerAlias = Impl, TArgs extends Args = Args>(\r\n originalKey: PrimitiveOrDependencyCtor,\r\n aliasKey: PrimitiveOrDependencyCtor): Resolver {\r\n return this.registerResolver(\r\n aliasKey,\r\n new StrategyResolver(5, originalKey)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param resolver The resolver to use when the dependency is needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n resolver: Resolver\r\n ): Resolver {\r\n validateKey(key);\r\n\r\n const allResolvers = this._resolvers;\r\n const result = allResolvers.get(key);\r\n\r\n if (result === undefined) {\r\n allResolvers.set(key, resolver);\r\n } else if (result.strategy === 4) {\r\n result.state.push(resolver);\r\n } else {\r\n allResolvers.set(key, new StrategyResolver(4, [result, resolver]));\r\n }\r\n\r\n return resolver;\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) by inspecting its registration\r\n * annotations. If none are found, then the default singleton registration is\r\n * used.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n */\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n fn = fn === undefined ? key as DependencyCtor : fn;\r\n\r\n if (typeof fn === 'function') {\r\n const registration = metadata.get(metadata.registration, fn);\r\n\r\n if (registration === undefined) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn));\r\n }\r\n\r\n return registration.registerResolver(this, key, fn);\r\n }\r\n\r\n return this.registerResolver(key, new StrategyResolver(0, fn));\r\n }\r\n\r\n /**\r\n * Registers an array of types (constructor functions) by inspecting their\r\n * registration annotations. If none are found, then the default singleton\r\n * registration is used.\r\n * @param fns The constructor function to use when the dependency needs to be instantiated.\r\n */\r\n public autoRegisterAll(fns: DependencyCtor[]): void {\r\n let i = fns.length;\r\n while (i--) {\r\n this.autoRegister(fns[i]);\r\n }\r\n }\r\n\r\n /**\r\n * Unregisters based on key.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n */\r\n public unregister(key: any): void {\r\n this._resolvers.delete(key);\r\n }\r\n\r\n /**\r\n * Inspects the container to determine if a particular key has been registred.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @param checkParent Indicates whether or not to check the parent container hierarchy.\r\n * @return Returns true if the key has been registred; false otherwise.\r\n */\r\n public hasResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, checkParent: boolean = false): boolean {\r\n validateKey(key);\r\n\r\n return (\r\n this._resolvers.has(key) ||\r\n (checkParent &&\r\n this.parent !== null &&\r\n this.parent.hasResolver(key, checkParent))\r\n );\r\n }\r\n\r\n /**\r\n * Gets the resolver for the particular key, if it has been registered.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @return Returns the resolver, if registred, otherwise undefined.\r\n */\r\n public getResolver<\r\n TStrategyKey extends keyof StrategyState,\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n >(\r\n key: PrimitiveOrDependencyCtorOrFunctor\r\n ): StrategyResolver {\r\n return this._resolvers.get(key);\r\n }\r\n\r\n /**\r\n * Resolves a single instance based on the provided key.\r\n * @param key The key that identifies the object to resolve.\r\n * @return Returns the resolved instance.\r\n */\r\n public get | Lazy | Factory | Optional | Parent | All>(\r\n key: TResolver): ResolvedValue;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: typeof Container): Container;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor | typeof Container): ImplOrAny | Container {\r\n validateKey(key);\r\n\r\n if (key === Container) {\r\n return this;\r\n }\r\n\r\n if (resolverDecorates(key)) {\r\n return key.get(this, key);\r\n }\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key as DependencyCtor).get(this, key);\r\n }\r\n\r\n const registration = metadata.get(metadata.registration, key);\r\n\r\n if (registration === undefined) {\r\n return this.parent._get(key);\r\n }\r\n\r\n return registration.registerResolver(\r\n this, key, key as DependencyCtorOrFunctor).get(this, key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n public _get(key) {\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n\r\n return this.parent._get(key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n /**\r\n * Resolves all instance registered under the provided key.\r\n * @param key The key that identifies the objects to resolve.\r\n * @return Returns an array of the resolved instances.\r\n */\r\n public getAll = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny[] {\r\n validateKey(key);\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return _emptyParameters;\r\n }\r\n\r\n return this.parent.getAll(key);\r\n }\r\n\r\n if (resolver.strategy === 4) {\r\n const state = resolver.state;\r\n let i = state.length;\r\n const results = new Array(i);\r\n\r\n while (i--) {\r\n results[i] = state[i].get(this, key);\r\n }\r\n\r\n return results;\r\n }\r\n\r\n return [resolver.get(this, key)];\r\n }\r\n\r\n /**\r\n * Creates a new dependency injection container whose parent is the current container.\r\n * @return Returns a new container instance parented to this.\r\n */\r\n public createChild(): Container {\r\n const child = new Container(this._configuration);\r\n child.root = this.root;\r\n child.parent = this;\r\n return child;\r\n }\r\n\r\n /**\r\n * Invokes a function, recursively resolving its dependencies.\r\n * @param fn The function to invoke with the auto-resolved dependencies.\r\n * @param dynamicDependencies Additional function dependencies to use during invocation.\r\n * @return Returns the instance resulting from calling the function.\r\n */\r\n public invoke = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor,\r\n dynamicDependencies?: TArgs[number][]\r\n ): ImplOrAny {\r\n try {\r\n let handler = this._handlers.get(fn);\r\n\r\n if (handler === undefined) {\r\n handler = this._createInvocationHandler(fn);\r\n this._handlers.set(fn, handler);\r\n }\r\n\r\n return handler.invoke(this, dynamicDependencies);\r\n } catch (e) {\r\n // @ts-expect-error AggregateError returns an Error in its type hence it fails (new ...) but it's fine\r\n throw new AggregateError(\r\n `Error invoking ${fn.name}. Check the inner error for details.`,\r\n e as Error | undefined,\r\n true\r\n );\r\n }\r\n }\r\n\r\n public _createInvocationHandler\r\n = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor & { inject?: any; }\r\n ): InvocationHandler {\r\n let dependencies;\r\n\r\n if (fn.inject === undefined) {\r\n dependencies =\r\n metadata.getOwn(metadata.paramTypes, fn) || _emptyParameters;\r\n } else {\r\n dependencies = [];\r\n let ctor = fn;\r\n while (typeof ctor === 'function') {\r\n dependencies.push(...getDependencies(ctor));\r\n ctor = Object.getPrototypeOf(ctor);\r\n }\r\n }\r\n\r\n const invoker = metadata.getOwn(metadata.invoker, fn) || classInvoker;\r\n\r\n const handler = new InvocationHandler(fn, invoker, dependencies);\r\n return this._onHandlerCreated !== undefined\r\n ? this._onHandlerCreated(handler)\r\n : handler;\r\n }\r\n}\r\n\r\nexport type ResolvedValue =\r\n T extends (new (...args: any[]) => infer R)\r\n ? R\r\n : T extends (abstract new (...args: any[]) => infer R)\r\n ? R\r\n : T extends Factory\r\n ? (...args: unknown[]) => R\r\n : T extends Lazy\r\n ? () => R\r\n : T extends NewInstance\r\n ? R\r\n : T extends Optional\r\n ? R | null\r\n : T extends All\r\n ? R[]\r\n : T extends Parent\r\n ? R | null\r\n : T extends [infer T1, ...infer T2]\r\n ? [ResolvedValue, ...ResolvedValue]\r\n : T;\r\n\r\n/**\r\n * Resolve a key, or list of keys based on the current container.\r\n * \r\n * @example\r\n * ```ts\r\n * import { resolve } from 'aurelia-framework';\r\n * // or\r\n * // import { Container, resolve } from 'aurelia-dependency-injection';\r\n * \r\n * class MyCustomElement {\r\n * someService = resolve(MyService);\r\n * }\r\n * ```\r\n */\r\nexport function resolve(key: K): ResolvedValue;\r\nexport function resolve(...keys: K): ResolvedValue\r\nexport function resolve(...keys: K) {\r\n if (currentContainer == null) {\r\n throw new Error(`There is not a currently active container to resolve \"${String(keys)}\". Are you trying to \"new SomeClass(...)\" that has a resolve(...) call?`);\r\n }\r\n \r\n return keys.length === 1\r\n ? currentContainer.get(keys[0])\r\n : keys.map(containerGetKey, currentContainer);\r\n}\r\n\r\nfunction containerGetKey(this: Container, key: any) {\r\n return this.get(key);\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { DependencyCtorOrFunctor, ImplOrAny, Impl, Args, DependencyCtor, DependencyFunctor } from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom Invoker for the decorated item.\r\n */\r\nexport function invoker, TArgs extends Args>(\r\n value: Invoker\r\n): (target: DependencyCtor) => void {\r\n return target => {\r\n metadata.define(metadata.invoker, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies that the decorated item should be called as a factory\r\n * function, rather than a constructor.\r\n */\r\nexport function invokeAsFactory, TArgs extends Args>(\r\n potentialTarget?: DependencyCtor\r\n): void | ((target: DependencyCtor) => void) {\r\n const deco = (target: DependencyCtor) => {\r\n metadata.define(metadata.invoker, FactoryInvoker.instance, target);\r\n };\r\n\r\n return potentialTarget ? deco(potentialTarget) : deco;\r\n}\r\n\r\n/**\r\n * A strategy for invoking a function, resulting in an object instance.\r\n */\r\nexport interface Invoker, TArgs extends Args> {\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during\r\n * invocation.\r\n * @return The result of the function invocation.\r\n */\r\n invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny;\r\n}\r\n\r\n/**\r\n * An Invoker that is used to invoke a factory method.\r\n */\r\nexport class FactoryInvoker<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > implements Invoker {\r\n /**\r\n * The singleton instance of the FactoryInvoker.\r\n */\r\n public static instance: FactoryInvoker;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny {\r\n let i = dependencies.length;\r\n const args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(dependencies[i]);\r\n }\r\n\r\n return ((fn as DependencyFunctor).apply(undefined, args as TArgs)) as ImplOrAny;\r\n }\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(staticDependencies[i]);\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return (fn as DependencyFunctor).apply(undefined, args as TArgs) as ImplOrAny;\r\n }\r\n}\r\n\r\nFactoryInvoker.instance = new FactoryInvoker();\r\n","import './internal';\r\nimport { Resolver } from './resolvers';\r\nimport { Container } from './container';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtor,\r\n Impl,\r\n Args,\r\n DependencyCtor\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom registration strategy for the decorated\r\n * class/function.\r\n */\r\nexport function registration, TArgs extends Args>(\r\n value: Registration) {\r\n return (target: DependencyCtor) => {\r\n metadata.define(metadata.registration, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"transient\"\r\n * lifetime.\r\n */\r\nexport function transient, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor) {\r\n return registration(new TransientRegistration(key));\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"singleton\"\r\n * lifetime.\r\n */\r\nexport function singleton(registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor, registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean, registerInChild: boolean = false) {\r\n return registration(\r\n new SingletonRegistration(keyOrRegisterInChild, registerInChild)\r\n );\r\n}\r\n\r\n/**\r\n * Customizes how a particular function is resolved by the Container.\r\n */\r\nexport interface Registration<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args> {\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver;\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * transients with the container.\r\n */\r\nexport class TransientRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of TransientRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(key?: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const existingResolver = container.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? container.registerTransient(\r\n (this._key || key) as string,\r\n fn as DependencyCtorOrFunctor)\r\n : existingResolver;\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * singletons with the container.\r\n */\r\nexport class SingletonRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _registerInChild: boolean;\r\n\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of SingletonRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean,\r\n registerInChild: boolean = false) {\r\n if (typeof keyOrRegisterInChild === 'boolean') {\r\n this._registerInChild = keyOrRegisterInChild;\r\n } else {\r\n this._key = keyOrRegisterInChild;\r\n this._registerInChild = registerInChild;\r\n }\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const targetContainer = this._registerInChild ? container : container.root;\r\n const existingResolver = targetContainer.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? targetContainer.registerSingleton(this._key || key, fn)\r\n : existingResolver;\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAsCA;AACO,SAAS,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;AAC1D,IAAI,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;AACjI,IAAI,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC,GAAG,OAAO,CAA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,gBAAgB,CACrB,SAAoB,EACpB,GAAmD,EACnD,EAAgD,EAAA;AAEhD,QAAA,MAAM,gBAAgB,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC;QACjE,OAAO,gBAAgB,KAAK,SAAS;AACnC,cAAE,SAAS,CAAC,iBAAiB,EAC1B,IAAI,CAAC,IAAI,IAAI,GAAG,GACjB,EAAkD,CAAC;cACnD,gBAAgB,CAAC;KACtB;AACF,CAAA;MAMY,qBAAqB,CAAA;IAYhC,WACE,CAAA,oBAA+E,EAC/E,eAAA,GAA2B,KAAK,EAAA;AAChC,QAAA,IAAI,OAAO,oBAAoB,KAAK,SAAS,EAAE;AAC7C,YAAA,IAAI,CAAC,gBAAgB,GAAG,oBAAoB,CAAC;SAC9C;aAAM;AACL,YAAA,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;AACjC,YAAA,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;SACzC;KACF;AASM,IAAA,gBAAgB,CACrB,SAAoB,EACpB,GAAmD,EACnD,EAAgD,EAAA;AAEhD,QAAA,MAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC;AAC3E,QAAA,MAAM,gBAAgB,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC;QACvE,OAAO,gBAAgB,KAAK,SAAS;AACnC,cAAE,eAAe,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,EAAE,EAAE,CAAC;cACvD,gBAAgB,CAAC;KACtB;AACF;;;;","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/dist/native-modules/aurelia-dependency-injection.js.map b/dist/native-modules/aurelia-dependency-injection.js.map index 4e9d0f0..5f44255 100644 --- a/dist/native-modules/aurelia-dependency-injection.js.map +++ b/dist/native-modules/aurelia-dependency-injection.js.map @@ -1 +1 @@ -{"version":3,"file":"aurelia-dependency-injection.js","sources":["../../node_modules/tslib/tslib.es6.js","../../../src/injection.ts","../../../src/resolvers.ts","../../../src/container.ts","../../../src/invokers.ts","../../../src/registrations.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","import { metadata } from 'aurelia-metadata';\r\nimport { _emptyParameters } from './container';\r\nimport { Args, Impl, DependencyCtor } from './types';\r\n\r\n// tslint:disable-next-line:ban-types\r\nexport type Injectable = Function & { inject?: any[] | (() => any[]) };\r\n\r\nfunction isInjectable(potentialTarget: any): potentialTarget is Injectable {\r\n return !!potentialTarget;\r\n}\r\n\r\n/**\r\n * Decorator: Directs the TypeScript transpiler to write-out type metadata for\r\n * the decorated class.\r\n */\r\nexport function autoinject(\r\n potentialTarget?: TPotential\r\n): TPotential extends Injectable ? void : (target: Injectable) => void {\r\n const deco = (target: Injectable): void => {\r\n if (!target.hasOwnProperty('inject')) {\r\n target.inject = (\r\n (metadata.getOwn(metadata.paramTypes, target) as any[]) ||\r\n _emptyParameters\r\n ).slice();\r\n if (target.inject && target.inject.length > 0) {\r\n // TypeScript 3.0 metadata for \"...rest\" gives type \"Object\"\r\n // if last parameter is \"Object\", assume it's a ...rest and remove that\r\n // metadata.\r\n if (target.inject[target.inject.length - 1] === Object) {\r\n target.inject.splice(-1, 1);\r\n }\r\n }\r\n }\r\n };\r\n if (isInjectable(potentialTarget)) {\r\n return deco(potentialTarget) as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n }\r\n return deco as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n}\r\n/**\r\n * Decorator: Specifies the dependencies that should be injected by the DI Container into the decorated class/function.\r\n */\r\nexport function inject<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(...rest: TArgs[number][]): any {\r\n return (\r\n target: DependencyCtor & { inject: any },\r\n _key: any,\r\n descriptor: any) => {\r\n // handle when used as a constructor parameter decorator\r\n if (typeof descriptor === 'number') {\r\n autoinject(target);\r\n if (rest.length === 1) {\r\n target.inject[descriptor] = rest[0];\r\n }\r\n return;\r\n }\r\n // if it's true then we injecting rest into function and not Class constructor\r\n if (descriptor) {\r\n const fn = descriptor.value;\r\n fn.inject = rest;\r\n } else {\r\n target.inject = rest;\r\n }\r\n };\r\n}\r\n","import { protocol } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { autoinject } from './injection';\r\nimport type {\r\n PrimitiveOrDependencyCtor,\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n DependencyCtor,\r\n DependencyFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Indicates that the decorated class/object is a custom resolver.\r\n */\r\nexport const resolver: {\r\n decorates?: (key: any) => key is { get(container: Container, key: any): any };\r\n} & (() => any) = ((protocol as unknown) as { create(...args: any[]): any }).create(\r\n 'aurelia:resolver',\r\n (target): string | boolean => {\r\n if (!(typeof target.get === 'function')) {\r\n return 'Resolvers must implement: get(container: Container, key: any): any';\r\n }\r\n\r\n return true;\r\n }\r\n);\r\n\r\n/**\r\n * Used to allow functions/classes to specify custom dependency resolution logic.\r\n */\r\nexport interface Resolver {\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n get(container: Container, key: any): any;\r\n}\r\n\r\nexport enum Strategy {\r\n instance = 0,\r\n singleton = 1,\r\n transient = 2,\r\n function = 3,\r\n array = 4,\r\n alias = 5\r\n}\r\nexport type IStrategy = 1 | 2 | 3 | 4 | 5;\r\n\r\nexport type StrategyFunctor<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > = (\r\n container?: Container,\r\n ctor?: PrimitiveOrDependencyCtorOrFunctor,\r\n strategyResolver?: any\r\n ) => TImpl;\r\n\r\nexport interface StrategyState<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > {\r\n [Strategy.instance]: TImpl;\r\n [Strategy.singleton]: DependencyCtorOrFunctor;\r\n [Strategy.transient]: DependencyCtorOrFunctor;\r\n [Strategy.function]: StrategyFunctor;\r\n /**\r\n * For typings purposes, this is done as ({ get: StrategyFunctor } | TImpl)[]\r\n * But it should be understood, and used as [{ get: StrategyFunctor }, ...TImp[]]\r\n */\r\n [Strategy.array]: ({\r\n get: (\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor\r\n ) => TImpl\r\n } | TImpl)[];\r\n [Strategy.alias]: any;\r\n}\r\n\r\nfunction isStrategy<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TKey extends keyof StrategyState\r\n>(\r\n actual: Strategy,\r\n expected: TKey,\r\n state):\r\n state is StrategyState[TKey] {\r\n return actual === expected;\r\n}\r\n/**\r\n * Used to resolve instances, singletons, transients, aliases\r\n */\r\n@resolver()\r\nexport class StrategyResolver<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TStrategyKey extends keyof StrategyState> {\r\n\r\n public strategy: keyof StrategyState;\r\n public state: StrategyState[keyof StrategyState];\r\n\r\n /**\r\n * Creates an instance of the StrategyResolver class.\r\n * @param strategy The type of resolution strategy.\r\n * @param state The state associated with the resolution strategy.\r\n */\r\n constructor(strategy: TStrategyKey, state: StrategyState[TStrategyKey]) {\r\n this.strategy = strategy;\r\n this.state = state;\r\n }\r\n\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n public get(container: Container, key: PrimitiveOrDependencyCtor) {\r\n if (isStrategy(this.strategy, Strategy.instance, this.state)) {\r\n return this.state;\r\n }\r\n if (isStrategy(this.strategy, Strategy.singleton, this.state)) {\r\n const singleton = container.invoke(this.state);\r\n this.state = singleton;\r\n this.strategy = 0;\r\n return singleton;\r\n }\r\n if (isStrategy(this.strategy, Strategy.transient, this.state)) {\r\n return container.invoke(this.state);\r\n }\r\n if (isStrategy(this.strategy, Strategy.function, this.state)) {\r\n return this.state(container, key, this);\r\n }\r\n if (isStrategy(this.strategy, Strategy.array, this.state)) {\r\n return (this.state[0] as { get: StrategyFunctor }).get(container, key);\r\n }\r\n if (isStrategy(this.strategy, Strategy.alias, this.state)) {\r\n return container.get(this.state) as TImpl;\r\n }\r\n throw new Error('Invalid strategy: ' + this.strategy);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify lazy resolution logic.\r\n */\r\n@resolver()\r\nexport class Lazy = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'lazy';\r\n\r\n /**\r\n * Creates an instance of the Lazy class.\r\n * @param key The key to lazily resolve.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to lazily resolve the dependency into a lazy locator\r\n * function.\r\n * @param container The container to resolve from.\r\n * @return Returns a function which can be invoked at a later time to obtain\r\n * the actual dependency.\r\n */\r\n public get(container: Container): () => ImplOrAny {\r\n return () => container.get(this._key);\r\n }\r\n\r\n /**\r\n * Creates a Lazy Resolver for the supplied key.\r\n * @param key The key to lazily resolve.\r\n * @return Returns an instance of Lazy for the key.\r\n */\r\n public static of<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ) {\r\n return new Lazy(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify resolution of all matches to a key.\r\n */\r\n@resolver()\r\nexport class All = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'all';\r\n\r\n /**\r\n * Creates an instance of the All class.\r\n * @param key The key to lazily resolve all matches for.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to resolve all matching dependencies as an array of\r\n * instances.\r\n * @param container The container to resolve from.\r\n * @return Returns an array of all matching instances.\r\n */\r\n public get(container: Container): TImpl[] {\r\n return container.getAll(this._key);\r\n }\r\n\r\n /**\r\n * Creates an All Resolver for the supplied key.\r\n * @param key The key to resolve all instances for.\r\n * @return Returns an instance of All for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): All {\r\n return new All(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify an optional dependency, which will\r\n * be resolved only if already registred with the container.\r\n */\r\n@resolver()\r\nexport class Optional = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /** @internal */\r\n public _checkParent: boolean;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'optional';\r\n\r\n /**\r\n * Creates an instance of the Optional class.\r\n * @param key The key to optionally resolve for.\r\n * @param checkParent Indicates whether or not the parent container hierarchy\r\n * should be checked.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor, checkParent: boolean = true) {\r\n this._key = key;\r\n this._checkParent = checkParent;\r\n }\r\n\r\n /**\r\n * Called by the container to provide optional resolution of the key.\r\n * @param container The container to resolve from.\r\n * @return Returns the instance if found; otherwise null.\r\n */\r\n public get(container: Container): TImpl | null {\r\n if (container.hasResolver(this._key, this._checkParent)) {\r\n return container.get(this._key);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Creates an Optional Resolver for the supplied key.\r\n * @param key The key to optionally resolve for.\r\n * @param [checkParent=true] Indicates whether or not the parent container\r\n * hierarchy should be checked.\r\n * @return Returns an instance of Optional for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n checkParent: boolean = true): Optional {\r\n return new Optional(key, checkParent);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject the dependency from the parent container instead of the current\r\n * one.\r\n */\r\n@resolver()\r\nexport class Parent = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'parent';\r\n\r\n /**\r\n * Creates an instance of the Parent class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to load the dependency from the parent container\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container): TImpl | null {\r\n return container.parent ? container.parent.get(this._key) : null;\r\n }\r\n\r\n /**\r\n * Creates a Parent Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Parent for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): Parent {\r\n return new Parent(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow injecting dependencies but also passing data to the constructor.\r\n */\r\n@resolver()\r\nexport class Factory = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtorOrFunctor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'factory';\r\n\r\n /**\r\n * Creates an instance of the Factory class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to pass the dependencies to the constructor.\r\n * @param container The container to invoke the constructor with dependencies\r\n * and other parameters.\r\n * @return Returns a function that can be invoked to resolve dependencies\r\n * later, and the rest of the parameters.\r\n */\r\n public get(container: Container): DependencyFunctor {\r\n let fn = this._key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === Strategy.function) {\r\n fn = resolver.state;\r\n }\r\n\r\n return (...rest) => container.invoke(fn as DependencyCtorOrFunctor, rest);\r\n }\r\n\r\n /**\r\n * Creates a Factory Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Factory for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: DependencyCtor\r\n ): Factory {\r\n return new Factory(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject a new instance of a dependency, without regard for existing\r\n * instances in the container. Instances can optionally be registered in the\r\n * container\r\n * under a different key by supplying a key using the `as` method.\r\n */\r\n@resolver()\r\nexport class NewInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public key: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public asKey: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public dynamicDependencies: TArgs[number][];\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'newInstance';\r\n\r\n /**\r\n * Creates an instance of the NewInstance class.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor, ...dynamicDependencies: TArgs[number][]) {\r\n this.key = key;\r\n this.asKey = key;\r\n this.dynamicDependencies = dynamicDependencies;\r\n }\r\n\r\n /**\r\n * Called by the container to instantiate the dependency and potentially\r\n * register\r\n * as another key if the `as` method was used.\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container) {\r\n const dynamicDependencies =\r\n this.dynamicDependencies.length > 0\r\n ? this.dynamicDependencies.map(dependency =>\r\n dependency['protocol:aurelia:resolver']\r\n ? dependency.get(container)\r\n : container.get(dependency)\r\n )\r\n : undefined;\r\n\r\n let fn = this.key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === 3) {\r\n fn = resolver.state;\r\n }\r\n\r\n const instance = container.invoke(fn as DependencyCtorOrFunctor, dynamicDependencies);\r\n container.registerInstance(this.asKey, instance);\r\n return instance;\r\n }\r\n\r\n /**\r\n * Instructs the NewInstance resolver to register the resolved instance using\r\n * the supplied key.\r\n * @param key The key to register the instance with.\r\n * @return Returns the NewInstance resolver.\r\n */\r\n public as(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this.asKey = key;\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates an NewInstance Resolver for the supplied key.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n * @return Returns an instance of NewInstance for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtorOrFunctor,\r\n ...dynamicDependencies: TArgs[number][]): NewInstance {\r\n return new NewInstance(key, ...dynamicDependencies);\r\n }\r\n}\r\n\r\n/**\r\n * Used by parameter decorators to call autoinject for the target and retrieve\r\n * the target's inject property.\r\n * @param target The target class.\r\n * @return Returns the target's own inject property.\r\n */\r\nexport function getDecoratorDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] }\r\n ) {\r\n autoinject(target);\r\n\r\n return target.inject;\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should be lazy loaded\r\n */\r\nexport function lazy<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: { new (...args: TArgs): TBase | TImpl },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Lazy.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should load all instances of the given\r\n * key.\r\n */\r\nexport function all<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = All.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as optional\r\n */\r\nexport function optional<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n checkParentOrTarget: boolean = true) {\r\n const deco = (checkParent: boolean) => {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Optional.of(inject[index], checkParent);\r\n };\r\n };\r\n if (typeof checkParentOrTarget === 'boolean') {\r\n return deco(checkParentOrTarget);\r\n }\r\n return deco(true);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to look at the parent container for\r\n * resolution\r\n */\r\nexport function parent<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Parent.of(inject[index]);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to create a factory method, that can\r\n * accept optional arguments\r\n */\r\nexport function factory<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Factory.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as a new instance. Instances can optionally be registered in the container\r\n * under a different key and/or use dynamic dependencies\r\n */\r\nexport function newInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n asKeyOrTarget?: PrimitiveOrDependencyCtor & { inject?: TArgs[number][] },\r\n ...dynamicDependencies: TArgs[number][]\r\n) {\r\n const deco = (asKey?: typeof asKeyOrTarget) => {\r\n return (\r\n target: { new (...args: any[]): any },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = NewInstance.of(inject[index], ...dynamicDependencies);\r\n if (!!asKey) {\r\n inject[index].as(asKey);\r\n }\r\n };\r\n };\r\n if (arguments.length >= 1) {\r\n return deco(asKeyOrTarget);\r\n }\r\n return deco();\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { AggregateError } from 'aurelia-pal';\r\nimport { resolver, StrategyResolver, Resolver, Strategy, StrategyState, Factory, NewInstance, Lazy, Optional, All, Parent } from './resolvers';\r\nimport { Invoker } from './invokers';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n DependencyCtor,\r\n PrimitiveOrDependencyCtor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args,\r\n Primitive\r\n} from './types';\r\n\r\nlet currentContainer: Container | null = null;\r\n\r\nfunction validateKey(key: any) {\r\n if (key === null || key === undefined) {\r\n throw new Error(\r\n 'key/value cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport const _emptyParameters = Object.freeze([]) as [];\r\n\r\nmetadata.registration = 'aurelia:registration';\r\nmetadata.invoker = 'aurelia:invoker';\r\n\r\nconst resolverDecorates = resolver.decorates!;\r\n\r\n/**\r\n * Stores the information needed to invoke a function.\r\n */\r\nexport class InvocationHandler<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args\r\n > {\r\n /**\r\n * The function to be invoked by this handler.\r\n */\r\n public fn: DependencyCtorOrFunctor;\r\n\r\n /**\r\n * The invoker implementation that will be used to actually invoke the function.\r\n */\r\n public invoker: Invoker;\r\n\r\n /**\r\n * The statically known dependencies of this function invocation.\r\n */\r\n public dependencies: TArgs;\r\n\r\n /**\r\n * Instantiates an InvocationDescription.\r\n * @param fn The Function described by this description object.\r\n * @param invoker The strategy for invoking the function.\r\n * @param dependencies The static dependencies of the function call.\r\n */\r\n constructor(\r\n fn: DependencyCtorOrFunctor,\r\n invoker: Invoker,\r\n dependencies: TArgs\r\n ) {\r\n this.fn = fn;\r\n this.invoker = invoker;\r\n this.dependencies = dependencies;\r\n }\r\n\r\n /**\r\n * Invokes the function.\r\n * @param container The calling container.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(container: Container, dynamicDependencies?: TArgs[]): TImpl {\r\n const previousContainer = currentContainer;\r\n currentContainer = container;\r\n try {\r\n return dynamicDependencies !== undefined\r\n ? this.invoker.invokeWithDynamicDependencies(\r\n container,\r\n this.fn,\r\n this.dependencies,\r\n dynamicDependencies\r\n )\r\n : this.invoker.invoke(container, this.fn, this.dependencies);\r\n } finally {\r\n currentContainer = previousContainer;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Used to configure a Container instance.\r\n */\r\nexport interface ContainerConfiguration {\r\n /**\r\n * An optional callback which will be called when any function needs an\r\n * InvocationHandler created (called once per Function).\r\n */\r\n onHandlerCreated?: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n handlers?: Map;\r\n}\r\n\r\nfunction invokeWithDynamicDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n) {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n let lookup;\r\n\r\n while (i--) {\r\n lookup = staticDependencies[i];\r\n\r\n if (lookup === null || lookup === undefined) {\r\n throw new Error(\r\n 'Constructor Parameter with index ' +\r\n i +\r\n ' cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n } else {\r\n args[i] = container.get(lookup);\r\n }\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return Reflect.construct(fn, args);\r\n}\r\n\r\nconst classInvoker: Invoker = {\r\n invoke(container, Type: DependencyCtor, deps) {\r\n const instances = deps.map((dep) => container.get(dep));\r\n return Reflect.construct(Type, instances);\r\n },\r\n invokeWithDynamicDependencies\r\n};\r\n\r\nfunction getDependencies(f) {\r\n if (!f.hasOwnProperty('inject')) {\r\n return [];\r\n }\r\n\r\n if (typeof f.inject === 'function') {\r\n return f.inject();\r\n }\r\n\r\n return f.inject;\r\n}\r\n\r\n/**\r\n * A lightweight, extensible dependency injection container.\r\n */\r\nexport class Container {\r\n /**\r\n * The global root Container instance. Available if makeGlobal() has been\r\n * called. Aurelia Framework calls makeGlobal().\r\n */\r\n public static instance: Container;\r\n\r\n /**\r\n * The parent container in the DI hierarchy.\r\n */\r\n public parent: Container | null;\r\n\r\n /**\r\n * The root container in the DI hierarchy.\r\n */\r\n public root: Container;\r\n\r\n /** @internal */\r\n public _configuration: ContainerConfiguration;\r\n\r\n /** @internal */\r\n public _onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n /** @internal */\r\n public _handlers: Map;\r\n\r\n /** @internal */\r\n public _resolvers: Map;\r\n\r\n /**\r\n * Creates an instance of Container.\r\n * @param configuration Provides some configuration for the new Container instance.\r\n */\r\n constructor(configuration?: ContainerConfiguration) {\r\n if (configuration === undefined) {\r\n configuration = {};\r\n }\r\n\r\n this._configuration = configuration;\r\n this._onHandlerCreated = configuration.onHandlerCreated!;\r\n this._handlers =\r\n configuration.handlers || (configuration.handlers = new Map());\r\n this._resolvers = new Map();\r\n this.root = this;\r\n this.parent = null;\r\n }\r\n\r\n /**\r\n * Makes this container instance globally reachable through Container.instance.\r\n */\r\n public makeGlobal(): Container {\r\n Container.instance = this;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets an invocation handler creation callback that will be called when new\r\n * InvocationsHandlers are created (called once per Function).\r\n * @param onHandlerCreated The callback to be called when an\r\n * InvocationsHandler is created.\r\n */\r\n public setHandlerCreatedCallback<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler\r\n ) {\r\n this._onHandlerCreated = onHandlerCreated;\r\n this._configuration.onHandlerCreated = onHandlerCreated;\r\n }\r\n\r\n /**\r\n * Registers an existing object instance with the container.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param instance The instance that will be resolved when the key is matched.\r\n * This defaults to the key value when instance is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerInstance = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n instance?: TImpl): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(0, instance === undefined ? key : instance)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container always\r\n * returns the same instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.singleton, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container returns a\r\n * new instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(2, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param handler The resolution function to use when the dependency is\r\n * needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerHandler = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n handler: (container?: Container, key?: PrimitiveOrDependencyCtor, resolver?: Resolver) => any\r\n ): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.function, handler)\r\n );\r\n }\r\n\r\n /**\r\n * Registers an additional key that serves as an alias to the original DI key.\r\n * @param originalKey The key that originally identified the dependency; usually a constructor function.\r\n * @param aliasKey An alternate key which can also be used to resolve the same dependency as the original.\r\n * @return The resolver that was registered.\r\n */\r\n public registerAlias = Impl, TArgs extends Args = Args>(\r\n originalKey: PrimitiveOrDependencyCtor,\r\n aliasKey: PrimitiveOrDependencyCtor): Resolver {\r\n return this.registerResolver(\r\n aliasKey,\r\n new StrategyResolver(5, originalKey)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param resolver The resolver to use when the dependency is needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n resolver: Resolver\r\n ): Resolver {\r\n validateKey(key);\r\n\r\n const allResolvers = this._resolvers;\r\n const result = allResolvers.get(key);\r\n\r\n if (result === undefined) {\r\n allResolvers.set(key, resolver);\r\n } else if (result.strategy === 4) {\r\n result.state.push(resolver);\r\n } else {\r\n allResolvers.set(key, new StrategyResolver(4, [result, resolver]));\r\n }\r\n\r\n return resolver;\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) by inspecting its registration\r\n * annotations. If none are found, then the default singleton registration is\r\n * used.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n */\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n fn = fn === undefined ? key as DependencyCtor : fn;\r\n\r\n if (typeof fn === 'function') {\r\n const registration = metadata.get(metadata.registration, fn);\r\n\r\n if (registration === undefined) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn));\r\n }\r\n\r\n return registration.registerResolver(this, key, fn);\r\n }\r\n\r\n return this.registerResolver(key, new StrategyResolver(0, fn));\r\n }\r\n\r\n /**\r\n * Registers an array of types (constructor functions) by inspecting their\r\n * registration annotations. If none are found, then the default singleton\r\n * registration is used.\r\n * @param fns The constructor function to use when the dependency needs to be instantiated.\r\n */\r\n public autoRegisterAll(fns: DependencyCtor[]): void {\r\n let i = fns.length;\r\n while (i--) {\r\n this.autoRegister(fns[i]);\r\n }\r\n }\r\n\r\n /**\r\n * Unregisters based on key.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n */\r\n public unregister(key: any): void {\r\n this._resolvers.delete(key);\r\n }\r\n\r\n /**\r\n * Inspects the container to determine if a particular key has been registred.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @param checkParent Indicates whether or not to check the parent container hierarchy.\r\n * @return Returns true if the key has been registred; false otherwise.\r\n */\r\n public hasResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, checkParent: boolean = false): boolean {\r\n validateKey(key);\r\n\r\n return (\r\n this._resolvers.has(key) ||\r\n (checkParent &&\r\n this.parent !== null &&\r\n this.parent.hasResolver(key, checkParent))\r\n );\r\n }\r\n\r\n /**\r\n * Gets the resolver for the particular key, if it has been registered.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @return Returns the resolver, if registred, otherwise undefined.\r\n */\r\n public getResolver<\r\n TStrategyKey extends keyof StrategyState,\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n >(\r\n key: PrimitiveOrDependencyCtorOrFunctor\r\n ): StrategyResolver {\r\n return this._resolvers.get(key);\r\n }\r\n\r\n /**\r\n * Resolves a single instance based on the provided key.\r\n * @param key The key that identifies the object to resolve.\r\n * @return Returns the resolved instance.\r\n */\r\n public get | Lazy | Factory | Optional | Parent | All>(\r\n key: TResolver): ResolvedValue;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: typeof Container): Container;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor | typeof Container): ImplOrAny | Container {\r\n validateKey(key);\r\n\r\n if (key === Container) {\r\n return this;\r\n }\r\n\r\n if (resolverDecorates(key)) {\r\n return key.get(this, key);\r\n }\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key as DependencyCtor).get(this, key);\r\n }\r\n\r\n const registration = metadata.get(metadata.registration, key);\r\n\r\n if (registration === undefined) {\r\n return this.parent._get(key);\r\n }\r\n\r\n return registration.registerResolver(\r\n this, key, key as DependencyCtorOrFunctor).get(this, key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n public _get(key) {\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n\r\n return this.parent._get(key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n /**\r\n * Resolves all instance registered under the provided key.\r\n * @param key The key that identifies the objects to resolve.\r\n * @return Returns an array of the resolved instances.\r\n */\r\n public getAll = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny[] {\r\n validateKey(key);\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return _emptyParameters;\r\n }\r\n\r\n return this.parent.getAll(key);\r\n }\r\n\r\n if (resolver.strategy === 4) {\r\n const state = resolver.state;\r\n let i = state.length;\r\n const results = new Array(i);\r\n\r\n while (i--) {\r\n results[i] = state[i].get(this, key);\r\n }\r\n\r\n return results;\r\n }\r\n\r\n return [resolver.get(this, key)];\r\n }\r\n\r\n /**\r\n * Creates a new dependency injection container whose parent is the current container.\r\n * @return Returns a new container instance parented to this.\r\n */\r\n public createChild(): Container {\r\n const child = new Container(this._configuration);\r\n child.root = this.root;\r\n child.parent = this;\r\n return child;\r\n }\r\n\r\n /**\r\n * Invokes a function, recursively resolving its dependencies.\r\n * @param fn The function to invoke with the auto-resolved dependencies.\r\n * @param dynamicDependencies Additional function dependencies to use during invocation.\r\n * @return Returns the instance resulting from calling the function.\r\n */\r\n public invoke = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor,\r\n dynamicDependencies?: TArgs[number][]\r\n ): ImplOrAny {\r\n try {\r\n let handler = this._handlers.get(fn);\r\n\r\n if (handler === undefined) {\r\n handler = this._createInvocationHandler(fn);\r\n this._handlers.set(fn, handler);\r\n }\r\n\r\n return handler.invoke(this, dynamicDependencies);\r\n } catch (e) {\r\n // @ts-expect-error AggregateError returns an Error in its type hence it fails (new ...) but it's fine\r\n throw new AggregateError(\r\n `Error invoking ${fn.name}. Check the inner error for details.`,\r\n e as Error | undefined,\r\n true\r\n );\r\n }\r\n }\r\n\r\n public _createInvocationHandler\r\n = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor & { inject?: any; }\r\n ): InvocationHandler {\r\n let dependencies;\r\n\r\n if (fn.inject === undefined) {\r\n dependencies =\r\n metadata.getOwn(metadata.paramTypes, fn) || _emptyParameters;\r\n } else {\r\n dependencies = [];\r\n let ctor = fn;\r\n while (typeof ctor === 'function') {\r\n dependencies.push(...getDependencies(ctor));\r\n ctor = Object.getPrototypeOf(ctor);\r\n }\r\n }\r\n\r\n const invoker = metadata.getOwn(metadata.invoker, fn) || classInvoker;\r\n\r\n const handler = new InvocationHandler(fn, invoker, dependencies);\r\n return this._onHandlerCreated !== undefined\r\n ? this._onHandlerCreated(handler)\r\n : handler;\r\n }\r\n}\r\n\r\nexport type ResolvedValue =\r\n T extends { new (...args: any[]): infer R }\r\n ? R\r\n : T extends Factory\r\n ? (...args: unknown[]) => R\r\n : T extends Lazy\r\n ? () => R\r\n : T extends NewInstance\r\n ? R\r\n : T extends Optional\r\n ? R | null\r\n : T extends All\r\n ? R[]\r\n : T extends Parent\r\n ? R | null\r\n : T extends [infer T1, ...infer T2]\r\n ? [ResolvedValue, ...ResolvedValue]\r\n : T;\r\n\r\n/**\r\n * Resolve a key, or list of keys based on the current container.\r\n * \r\n * @example\r\n * ```ts\r\n * import { resolve } from 'aurelia-framework';\r\n * // or\r\n * // import { Container, resolve } from 'aurelia-dependency-injection';\r\n * \r\n * class MyCustomElement {\r\n * someService = resolve(MyService);\r\n * }\r\n * ```\r\n */\r\nexport function resolve(key: K): ResolvedValue;\r\nexport function resolve(...keys: K): ResolvedValue\r\nexport function resolve(...keys: K) {\r\n if (currentContainer == null) {\r\n throw new Error(`There is not a currently active container to resolve \"${String(keys)}\". Are you trying to \"new SomeClass(...)\" that has a resolve(...) call?`);\r\n }\r\n \r\n return keys.length === 1\r\n ? currentContainer.get(keys[0])\r\n : keys.map(containerGetKey, currentContainer);\r\n}\r\n\r\nfunction containerGetKey(this: Container, key: any) {\r\n return this.get(key);\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { DependencyCtorOrFunctor, ImplOrAny, Impl, Args, DependencyCtor, DependencyFunctor } from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom Invoker for the decorated item.\r\n */\r\nexport function invoker, TArgs extends Args>(\r\n value: Invoker\r\n): (target: DependencyCtor) => void {\r\n return target => {\r\n metadata.define(metadata.invoker, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies that the decorated item should be called as a factory\r\n * function, rather than a constructor.\r\n */\r\nexport function invokeAsFactory, TArgs extends Args>(\r\n potentialTarget?: DependencyCtor\r\n): void | ((target: DependencyCtor) => void) {\r\n const deco = (target: DependencyCtor) => {\r\n metadata.define(metadata.invoker, FactoryInvoker.instance, target);\r\n };\r\n\r\n return potentialTarget ? deco(potentialTarget) : deco;\r\n}\r\n\r\n/**\r\n * A strategy for invoking a function, resulting in an object instance.\r\n */\r\nexport interface Invoker, TArgs extends Args> {\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during\r\n * invocation.\r\n * @return The result of the function invocation.\r\n */\r\n invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny;\r\n}\r\n\r\n/**\r\n * An Invoker that is used to invoke a factory method.\r\n */\r\nexport class FactoryInvoker<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > implements Invoker {\r\n /**\r\n * The singleton instance of the FactoryInvoker.\r\n */\r\n public static instance: FactoryInvoker;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny {\r\n let i = dependencies.length;\r\n const args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(dependencies[i]);\r\n }\r\n\r\n return ((fn as DependencyFunctor).apply(undefined, args as TArgs)) as ImplOrAny;\r\n }\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(staticDependencies[i]);\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return (fn as DependencyFunctor).apply(undefined, args as TArgs) as ImplOrAny;\r\n }\r\n}\r\n\r\nFactoryInvoker.instance = new FactoryInvoker();\r\n","import './internal';\r\nimport { Resolver } from './resolvers';\r\nimport { Container } from './container';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtor,\r\n Impl,\r\n Args,\r\n DependencyCtor\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom registration strategy for the decorated\r\n * class/function.\r\n */\r\nexport function registration, TArgs extends Args>(\r\n value: Registration) {\r\n return (target: DependencyCtor) => {\r\n metadata.define(metadata.registration, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"transient\"\r\n * lifetime.\r\n */\r\nexport function transient, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor) {\r\n return registration(new TransientRegistration(key));\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"singleton\"\r\n * lifetime.\r\n */\r\nexport function singleton(registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor, registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean, registerInChild: boolean = false) {\r\n return registration(\r\n new SingletonRegistration(keyOrRegisterInChild, registerInChild)\r\n );\r\n}\r\n\r\n/**\r\n * Customizes how a particular function is resolved by the Container.\r\n */\r\nexport interface Registration<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args> {\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver;\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * transients with the container.\r\n */\r\nexport class TransientRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of TransientRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(key?: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const existingResolver = container.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? container.registerTransient(\r\n (this._key || key) as string,\r\n fn as DependencyCtorOrFunctor)\r\n : existingResolver;\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * singletons with the container.\r\n */\r\nexport class SingletonRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _registerInChild: boolean;\r\n\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of SingletonRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean,\r\n registerInChild: boolean = false) {\r\n if (typeof keyOrRegisterInChild === 'boolean') {\r\n this._registerInChild = keyOrRegisterInChild;\r\n } else {\r\n this._key = keyOrRegisterInChild;\r\n this._registerInChild = registerInChild;\r\n }\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const targetContainer = this._registerInChild ? container : container.root;\r\n const existingResolver = targetContainer.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? targetContainer.registerSingleton(this._key || key, fn)\r\n : existingResolver;\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAsCA;AACO,SAAS,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;AAC1D,IAAI,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;AACjI,IAAI,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AACnI,SAAS,KAAK,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,UAAU,CAA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AEhD,QAAA,IAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC;AAC3E,QAAA,IAAM,gBAAgB,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC;QACvE,OAAO,gBAAgB,KAAK,SAAS;AACnC,cAAE,eAAe,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,EAAE,EAAE,CAAC;cACvD,gBAAgB,CAAC;KACtB,CAAA;IACH,OAAC,qBAAA,CAAA;AAAD,CAAC,EAAA;;;;","x_google_ignoreList":[0]} \ No newline at end of file +{"version":3,"file":"aurelia-dependency-injection.js","sources":["../../node_modules/tslib/tslib.es6.js","../../../src/injection.ts","../../../src/resolvers.ts","../../../src/container.ts","../../../src/invokers.ts","../../../src/registrations.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","import { metadata } from 'aurelia-metadata';\r\nimport { _emptyParameters } from './container';\r\nimport { Args, Impl, DependencyCtor } from './types';\r\n\r\n// tslint:disable-next-line:ban-types\r\nexport type Injectable = Function & { inject?: any[] | (() => any[]) };\r\n\r\nfunction isInjectable(potentialTarget: any): potentialTarget is Injectable {\r\n return !!potentialTarget;\r\n}\r\n\r\n/**\r\n * Decorator: Directs the TypeScript transpiler to write-out type metadata for\r\n * the decorated class.\r\n */\r\nexport function autoinject(\r\n potentialTarget?: TPotential\r\n): TPotential extends Injectable ? void : (target: Injectable) => void {\r\n const deco = (target: Injectable): void => {\r\n if (!target.hasOwnProperty('inject')) {\r\n target.inject = (\r\n (metadata.getOwn(metadata.paramTypes, target) as any[]) ||\r\n _emptyParameters\r\n ).slice();\r\n if (target.inject && target.inject.length > 0) {\r\n // TypeScript 3.0 metadata for \"...rest\" gives type \"Object\"\r\n // if last parameter is \"Object\", assume it's a ...rest and remove that\r\n // metadata.\r\n if (target.inject[target.inject.length - 1] === Object) {\r\n target.inject.splice(-1, 1);\r\n }\r\n }\r\n }\r\n };\r\n if (isInjectable(potentialTarget)) {\r\n return deco(potentialTarget) as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n }\r\n return deco as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n}\r\n/**\r\n * Decorator: Specifies the dependencies that should be injected by the DI Container into the decorated class/function.\r\n */\r\nexport function inject<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(...rest: TArgs[number][]): any {\r\n return (\r\n target: DependencyCtor & { inject: any },\r\n _key: any,\r\n descriptor: any) => {\r\n // handle when used as a constructor parameter decorator\r\n if (typeof descriptor === 'number') {\r\n autoinject(target);\r\n if (rest.length === 1) {\r\n target.inject[descriptor] = rest[0];\r\n }\r\n return;\r\n }\r\n // if it's true then we injecting rest into function and not Class constructor\r\n if (descriptor) {\r\n const fn = descriptor.value;\r\n fn.inject = rest;\r\n } else {\r\n target.inject = rest;\r\n }\r\n };\r\n}\r\n","import { protocol } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { autoinject } from './injection';\r\nimport type {\r\n PrimitiveOrDependencyCtor,\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n DependencyCtor,\r\n DependencyFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Indicates that the decorated class/object is a custom resolver.\r\n */\r\nexport const resolver: {\r\n decorates?: (key: any) => key is { get(container: Container, key: any): any };\r\n} & (() => any) = ((protocol as unknown) as { create(...args: any[]): any }).create(\r\n 'aurelia:resolver',\r\n (target): string | boolean => {\r\n if (!(typeof target.get === 'function')) {\r\n return 'Resolvers must implement: get(container: Container, key: any): any';\r\n }\r\n\r\n return true;\r\n }\r\n);\r\n\r\n/**\r\n * Used to allow functions/classes to specify custom dependency resolution logic.\r\n */\r\nexport interface Resolver {\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n get(container: Container, key: any): any;\r\n}\r\n\r\nexport enum Strategy {\r\n instance = 0,\r\n singleton = 1,\r\n transient = 2,\r\n function = 3,\r\n array = 4,\r\n alias = 5\r\n}\r\nexport type IStrategy = 1 | 2 | 3 | 4 | 5;\r\n\r\nexport type StrategyFunctor<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > = (\r\n container?: Container,\r\n ctor?: PrimitiveOrDependencyCtorOrFunctor,\r\n strategyResolver?: any\r\n ) => TImpl;\r\n\r\nexport interface StrategyState<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > {\r\n [Strategy.instance]: TImpl;\r\n [Strategy.singleton]: DependencyCtorOrFunctor;\r\n [Strategy.transient]: DependencyCtorOrFunctor;\r\n [Strategy.function]: StrategyFunctor;\r\n /**\r\n * For typings purposes, this is done as ({ get: StrategyFunctor } | TImpl)[]\r\n * But it should be understood, and used as [{ get: StrategyFunctor }, ...TImp[]]\r\n */\r\n [Strategy.array]: ({\r\n get: (\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor\r\n ) => TImpl\r\n } | TImpl)[];\r\n [Strategy.alias]: any;\r\n}\r\n\r\nfunction isStrategy<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TKey extends keyof StrategyState\r\n>(\r\n actual: Strategy,\r\n expected: TKey,\r\n state):\r\n state is StrategyState[TKey] {\r\n return actual === expected;\r\n}\r\n/**\r\n * Used to resolve instances, singletons, transients, aliases\r\n */\r\n@resolver()\r\nexport class StrategyResolver<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TStrategyKey extends keyof StrategyState> {\r\n\r\n public strategy: keyof StrategyState;\r\n public state: StrategyState[keyof StrategyState];\r\n\r\n /**\r\n * Creates an instance of the StrategyResolver class.\r\n * @param strategy The type of resolution strategy.\r\n * @param state The state associated with the resolution strategy.\r\n */\r\n constructor(strategy: TStrategyKey, state: StrategyState[TStrategyKey]) {\r\n this.strategy = strategy;\r\n this.state = state;\r\n }\r\n\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n public get(container: Container, key: PrimitiveOrDependencyCtor) {\r\n if (isStrategy(this.strategy, Strategy.instance, this.state)) {\r\n return this.state;\r\n }\r\n if (isStrategy(this.strategy, Strategy.singleton, this.state)) {\r\n const singleton = container.invoke(this.state);\r\n this.state = singleton;\r\n this.strategy = 0;\r\n return singleton;\r\n }\r\n if (isStrategy(this.strategy, Strategy.transient, this.state)) {\r\n return container.invoke(this.state);\r\n }\r\n if (isStrategy(this.strategy, Strategy.function, this.state)) {\r\n return this.state(container, key, this);\r\n }\r\n if (isStrategy(this.strategy, Strategy.array, this.state)) {\r\n return (this.state[0] as { get: StrategyFunctor }).get(container, key);\r\n }\r\n if (isStrategy(this.strategy, Strategy.alias, this.state)) {\r\n return container.get(this.state) as TImpl;\r\n }\r\n throw new Error('Invalid strategy: ' + this.strategy);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify lazy resolution logic.\r\n */\r\n@resolver()\r\nexport class Lazy = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'lazy';\r\n\r\n /**\r\n * Creates an instance of the Lazy class.\r\n * @param key The key to lazily resolve.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to lazily resolve the dependency into a lazy locator\r\n * function.\r\n * @param container The container to resolve from.\r\n * @return Returns a function which can be invoked at a later time to obtain\r\n * the actual dependency.\r\n */\r\n public get(container: Container): () => ImplOrAny {\r\n return () => container.get(this._key);\r\n }\r\n\r\n /**\r\n * Creates a Lazy Resolver for the supplied key.\r\n * @param key The key to lazily resolve.\r\n * @return Returns an instance of Lazy for the key.\r\n */\r\n public static of<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ) {\r\n return new Lazy(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify resolution of all matches to a key.\r\n */\r\n@resolver()\r\nexport class All = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'all';\r\n\r\n /**\r\n * Creates an instance of the All class.\r\n * @param key The key to lazily resolve all matches for.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to resolve all matching dependencies as an array of\r\n * instances.\r\n * @param container The container to resolve from.\r\n * @return Returns an array of all matching instances.\r\n */\r\n public get(container: Container): TImpl[] {\r\n return container.getAll(this._key);\r\n }\r\n\r\n /**\r\n * Creates an All Resolver for the supplied key.\r\n * @param key The key to resolve all instances for.\r\n * @return Returns an instance of All for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): All {\r\n return new All(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify an optional dependency, which will\r\n * be resolved only if already registred with the container.\r\n */\r\n@resolver()\r\nexport class Optional = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /** @internal */\r\n public _checkParent: boolean;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'optional';\r\n\r\n /**\r\n * Creates an instance of the Optional class.\r\n * @param key The key to optionally resolve for.\r\n * @param checkParent Indicates whether or not the parent container hierarchy\r\n * should be checked.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor, checkParent: boolean = true) {\r\n this._key = key;\r\n this._checkParent = checkParent;\r\n }\r\n\r\n /**\r\n * Called by the container to provide optional resolution of the key.\r\n * @param container The container to resolve from.\r\n * @return Returns the instance if found; otherwise null.\r\n */\r\n public get(container: Container): TImpl | null {\r\n if (container.hasResolver(this._key, this._checkParent)) {\r\n return container.get(this._key);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Creates an Optional Resolver for the supplied key.\r\n * @param key The key to optionally resolve for.\r\n * @param [checkParent=true] Indicates whether or not the parent container\r\n * hierarchy should be checked.\r\n * @return Returns an instance of Optional for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n checkParent: boolean = true): Optional {\r\n return new Optional(key, checkParent);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject the dependency from the parent container instead of the current\r\n * one.\r\n */\r\n@resolver()\r\nexport class Parent = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'parent';\r\n\r\n /**\r\n * Creates an instance of the Parent class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to load the dependency from the parent container\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container): TImpl | null {\r\n return container.parent ? container.parent.get(this._key) : null;\r\n }\r\n\r\n /**\r\n * Creates a Parent Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Parent for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): Parent {\r\n return new Parent(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow injecting dependencies but also passing data to the constructor.\r\n */\r\n@resolver()\r\nexport class Factory = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtorOrFunctor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'factory';\r\n\r\n /**\r\n * Creates an instance of the Factory class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to pass the dependencies to the constructor.\r\n * @param container The container to invoke the constructor with dependencies\r\n * and other parameters.\r\n * @return Returns a function that can be invoked to resolve dependencies\r\n * later, and the rest of the parameters.\r\n */\r\n public get(container: Container): DependencyFunctor {\r\n let fn = this._key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === Strategy.function) {\r\n fn = resolver.state;\r\n }\r\n\r\n return (...rest) => container.invoke(fn as DependencyCtorOrFunctor, rest);\r\n }\r\n\r\n /**\r\n * Creates a Factory Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Factory for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: DependencyCtor\r\n ): Factory {\r\n return new Factory(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject a new instance of a dependency, without regard for existing\r\n * instances in the container. Instances can optionally be registered in the\r\n * container\r\n * under a different key by supplying a key using the `as` method.\r\n */\r\n@resolver()\r\nexport class NewInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public key: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public asKey: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public dynamicDependencies: TArgs[number][];\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'newInstance';\r\n\r\n /**\r\n * Creates an instance of the NewInstance class.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor, ...dynamicDependencies: TArgs[number][]) {\r\n this.key = key;\r\n this.asKey = key;\r\n this.dynamicDependencies = dynamicDependencies;\r\n }\r\n\r\n /**\r\n * Called by the container to instantiate the dependency and potentially\r\n * register\r\n * as another key if the `as` method was used.\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container) {\r\n const dynamicDependencies =\r\n this.dynamicDependencies.length > 0\r\n ? this.dynamicDependencies.map(dependency =>\r\n dependency['protocol:aurelia:resolver']\r\n ? dependency.get(container)\r\n : container.get(dependency)\r\n )\r\n : undefined;\r\n\r\n let fn = this.key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === 3) {\r\n fn = resolver.state;\r\n }\r\n\r\n const instance = container.invoke(fn as DependencyCtorOrFunctor, dynamicDependencies);\r\n container.registerInstance(this.asKey, instance);\r\n return instance;\r\n }\r\n\r\n /**\r\n * Instructs the NewInstance resolver to register the resolved instance using\r\n * the supplied key.\r\n * @param key The key to register the instance with.\r\n * @return Returns the NewInstance resolver.\r\n */\r\n public as(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this.asKey = key;\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates an NewInstance Resolver for the supplied key.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n * @return Returns an instance of NewInstance for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtorOrFunctor,\r\n ...dynamicDependencies: TArgs[number][]): NewInstance {\r\n return new NewInstance(key, ...dynamicDependencies);\r\n }\r\n}\r\n\r\n/**\r\n * Used by parameter decorators to call autoinject for the target and retrieve\r\n * the target's inject property.\r\n * @param target The target class.\r\n * @return Returns the target's own inject property.\r\n */\r\nexport function getDecoratorDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] }\r\n ) {\r\n autoinject(target);\r\n\r\n return target.inject;\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should be lazy loaded\r\n */\r\nexport function lazy<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: { new (...args: TArgs): TBase | TImpl },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Lazy.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should load all instances of the given\r\n * key.\r\n */\r\nexport function all<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = All.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as optional\r\n */\r\nexport function optional<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n checkParentOrTarget: boolean = true) {\r\n const deco = (checkParent: boolean) => {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Optional.of(inject[index], checkParent);\r\n };\r\n };\r\n if (typeof checkParentOrTarget === 'boolean') {\r\n return deco(checkParentOrTarget);\r\n }\r\n return deco(true);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to look at the parent container for\r\n * resolution\r\n */\r\nexport function parent<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Parent.of(inject[index]);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to create a factory method, that can\r\n * accept optional arguments\r\n */\r\nexport function factory<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Factory.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as a new instance. Instances can optionally be registered in the container\r\n * under a different key and/or use dynamic dependencies\r\n */\r\nexport function newInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n asKeyOrTarget?: PrimitiveOrDependencyCtor & { inject?: TArgs[number][] },\r\n ...dynamicDependencies: TArgs[number][]\r\n) {\r\n const deco = (asKey?: typeof asKeyOrTarget) => {\r\n return (\r\n target: { new (...args: any[]): any },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = NewInstance.of(inject[index], ...dynamicDependencies);\r\n if (!!asKey) {\r\n inject[index].as(asKey);\r\n }\r\n };\r\n };\r\n if (arguments.length >= 1) {\r\n return deco(asKeyOrTarget);\r\n }\r\n return deco();\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { AggregateError } from 'aurelia-pal';\r\nimport { resolver, StrategyResolver, Resolver, Strategy, StrategyState, Factory, NewInstance, Lazy, Optional, All, Parent } from './resolvers';\r\nimport { Invoker } from './invokers';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n DependencyCtor,\r\n PrimitiveOrDependencyCtor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args,\r\n Primitive\r\n} from './types';\r\n\r\nlet currentContainer: Container | null = null;\r\n\r\nfunction validateKey(key: any) {\r\n if (key === null || key === undefined) {\r\n throw new Error(\r\n 'key/value cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport const _emptyParameters = Object.freeze([]) as [];\r\n\r\nmetadata.registration = 'aurelia:registration';\r\nmetadata.invoker = 'aurelia:invoker';\r\n\r\nconst resolverDecorates = resolver.decorates!;\r\n\r\n/**\r\n * Stores the information needed to invoke a function.\r\n */\r\nexport class InvocationHandler<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args\r\n > {\r\n /**\r\n * The function to be invoked by this handler.\r\n */\r\n public fn: DependencyCtorOrFunctor;\r\n\r\n /**\r\n * The invoker implementation that will be used to actually invoke the function.\r\n */\r\n public invoker: Invoker;\r\n\r\n /**\r\n * The statically known dependencies of this function invocation.\r\n */\r\n public dependencies: TArgs;\r\n\r\n /**\r\n * Instantiates an InvocationDescription.\r\n * @param fn The Function described by this description object.\r\n * @param invoker The strategy for invoking the function.\r\n * @param dependencies The static dependencies of the function call.\r\n */\r\n constructor(\r\n fn: DependencyCtorOrFunctor,\r\n invoker: Invoker,\r\n dependencies: TArgs\r\n ) {\r\n this.fn = fn;\r\n this.invoker = invoker;\r\n this.dependencies = dependencies;\r\n }\r\n\r\n /**\r\n * Invokes the function.\r\n * @param container The calling container.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(container: Container, dynamicDependencies?: TArgs[]): TImpl {\r\n const previousContainer = currentContainer;\r\n currentContainer = container;\r\n try {\r\n return dynamicDependencies !== undefined\r\n ? this.invoker.invokeWithDynamicDependencies(\r\n container,\r\n this.fn,\r\n this.dependencies,\r\n dynamicDependencies\r\n )\r\n : this.invoker.invoke(container, this.fn, this.dependencies);\r\n } finally {\r\n currentContainer = previousContainer;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Used to configure a Container instance.\r\n */\r\nexport interface ContainerConfiguration {\r\n /**\r\n * An optional callback which will be called when any function needs an\r\n * InvocationHandler created (called once per Function).\r\n */\r\n onHandlerCreated?: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n handlers?: Map;\r\n}\r\n\r\nfunction invokeWithDynamicDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n) {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n let lookup;\r\n\r\n while (i--) {\r\n lookup = staticDependencies[i];\r\n\r\n if (lookup === null || lookup === undefined) {\r\n throw new Error(\r\n 'Constructor Parameter with index ' +\r\n i +\r\n ' cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n } else {\r\n args[i] = container.get(lookup);\r\n }\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return Reflect.construct(fn, args);\r\n}\r\n\r\nconst classInvoker: Invoker = {\r\n invoke(container, Type: DependencyCtor, deps) {\r\n const instances = deps.map((dep) => container.get(dep));\r\n return Reflect.construct(Type, instances);\r\n },\r\n invokeWithDynamicDependencies\r\n};\r\n\r\nfunction getDependencies(f) {\r\n if (!f.hasOwnProperty('inject')) {\r\n return [];\r\n }\r\n\r\n if (typeof f.inject === 'function') {\r\n return f.inject();\r\n }\r\n\r\n return f.inject;\r\n}\r\n\r\n/**\r\n * A lightweight, extensible dependency injection container.\r\n */\r\nexport class Container {\r\n /**\r\n * The global root Container instance. Available if makeGlobal() has been\r\n * called. Aurelia Framework calls makeGlobal().\r\n */\r\n public static instance: Container;\r\n\r\n /**\r\n * The parent container in the DI hierarchy.\r\n */\r\n public parent: Container | null;\r\n\r\n /**\r\n * The root container in the DI hierarchy.\r\n */\r\n public root: Container;\r\n\r\n /** @internal */\r\n public _configuration: ContainerConfiguration;\r\n\r\n /** @internal */\r\n public _onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n /** @internal */\r\n public _handlers: Map;\r\n\r\n /** @internal */\r\n public _resolvers: Map;\r\n\r\n /**\r\n * Creates an instance of Container.\r\n * @param configuration Provides some configuration for the new Container instance.\r\n */\r\n constructor(configuration?: ContainerConfiguration) {\r\n if (configuration === undefined) {\r\n configuration = {};\r\n }\r\n\r\n this._configuration = configuration;\r\n this._onHandlerCreated = configuration.onHandlerCreated!;\r\n this._handlers =\r\n configuration.handlers || (configuration.handlers = new Map());\r\n this._resolvers = new Map();\r\n this.root = this;\r\n this.parent = null;\r\n }\r\n\r\n /**\r\n * Makes this container instance globally reachable through Container.instance.\r\n */\r\n public makeGlobal(): Container {\r\n Container.instance = this;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets an invocation handler creation callback that will be called when new\r\n * InvocationsHandlers are created (called once per Function).\r\n * @param onHandlerCreated The callback to be called when an\r\n * InvocationsHandler is created.\r\n */\r\n public setHandlerCreatedCallback<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler\r\n ) {\r\n this._onHandlerCreated = onHandlerCreated;\r\n this._configuration.onHandlerCreated = onHandlerCreated;\r\n }\r\n\r\n /**\r\n * Registers an existing object instance with the container.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param instance The instance that will be resolved when the key is matched.\r\n * This defaults to the key value when instance is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerInstance = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n instance?: TImpl): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(0, instance === undefined ? key : instance)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container always\r\n * returns the same instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.singleton, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container returns a\r\n * new instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(2, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param handler The resolution function to use when the dependency is\r\n * needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerHandler = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n handler: (container?: Container, key?: PrimitiveOrDependencyCtor, resolver?: Resolver) => any\r\n ): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.function, handler)\r\n );\r\n }\r\n\r\n /**\r\n * Registers an additional key that serves as an alias to the original DI key.\r\n * @param originalKey The key that originally identified the dependency; usually a constructor function.\r\n * @param aliasKey An alternate key which can also be used to resolve the same dependency as the original.\r\n * @return The resolver that was registered.\r\n */\r\n public registerAlias = Impl, TArgs extends Args = Args>(\r\n originalKey: PrimitiveOrDependencyCtor,\r\n aliasKey: PrimitiveOrDependencyCtor): Resolver {\r\n return this.registerResolver(\r\n aliasKey,\r\n new StrategyResolver(5, originalKey)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param resolver The resolver to use when the dependency is needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n resolver: Resolver\r\n ): Resolver {\r\n validateKey(key);\r\n\r\n const allResolvers = this._resolvers;\r\n const result = allResolvers.get(key);\r\n\r\n if (result === undefined) {\r\n allResolvers.set(key, resolver);\r\n } else if (result.strategy === 4) {\r\n result.state.push(resolver);\r\n } else {\r\n allResolvers.set(key, new StrategyResolver(4, [result, resolver]));\r\n }\r\n\r\n return resolver;\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) by inspecting its registration\r\n * annotations. If none are found, then the default singleton registration is\r\n * used.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n */\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n fn = fn === undefined ? key as DependencyCtor : fn;\r\n\r\n if (typeof fn === 'function') {\r\n const registration = metadata.get(metadata.registration, fn);\r\n\r\n if (registration === undefined) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn));\r\n }\r\n\r\n return registration.registerResolver(this, key, fn);\r\n }\r\n\r\n return this.registerResolver(key, new StrategyResolver(0, fn));\r\n }\r\n\r\n /**\r\n * Registers an array of types (constructor functions) by inspecting their\r\n * registration annotations. If none are found, then the default singleton\r\n * registration is used.\r\n * @param fns The constructor function to use when the dependency needs to be instantiated.\r\n */\r\n public autoRegisterAll(fns: DependencyCtor[]): void {\r\n let i = fns.length;\r\n while (i--) {\r\n this.autoRegister(fns[i]);\r\n }\r\n }\r\n\r\n /**\r\n * Unregisters based on key.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n */\r\n public unregister(key: any): void {\r\n this._resolvers.delete(key);\r\n }\r\n\r\n /**\r\n * Inspects the container to determine if a particular key has been registred.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @param checkParent Indicates whether or not to check the parent container hierarchy.\r\n * @return Returns true if the key has been registred; false otherwise.\r\n */\r\n public hasResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, checkParent: boolean = false): boolean {\r\n validateKey(key);\r\n\r\n return (\r\n this._resolvers.has(key) ||\r\n (checkParent &&\r\n this.parent !== null &&\r\n this.parent.hasResolver(key, checkParent))\r\n );\r\n }\r\n\r\n /**\r\n * Gets the resolver for the particular key, if it has been registered.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @return Returns the resolver, if registred, otherwise undefined.\r\n */\r\n public getResolver<\r\n TStrategyKey extends keyof StrategyState,\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n >(\r\n key: PrimitiveOrDependencyCtorOrFunctor\r\n ): StrategyResolver {\r\n return this._resolvers.get(key);\r\n }\r\n\r\n /**\r\n * Resolves a single instance based on the provided key.\r\n * @param key The key that identifies the object to resolve.\r\n * @return Returns the resolved instance.\r\n */\r\n public get | Lazy | Factory | Optional | Parent | All>(\r\n key: TResolver): ResolvedValue;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: typeof Container): Container;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor | typeof Container): ImplOrAny | Container {\r\n validateKey(key);\r\n\r\n if (key === Container) {\r\n return this;\r\n }\r\n\r\n if (resolverDecorates(key)) {\r\n return key.get(this, key);\r\n }\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key as DependencyCtor).get(this, key);\r\n }\r\n\r\n const registration = metadata.get(metadata.registration, key);\r\n\r\n if (registration === undefined) {\r\n return this.parent._get(key);\r\n }\r\n\r\n return registration.registerResolver(\r\n this, key, key as DependencyCtorOrFunctor).get(this, key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n public _get(key) {\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n\r\n return this.parent._get(key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n /**\r\n * Resolves all instance registered under the provided key.\r\n * @param key The key that identifies the objects to resolve.\r\n * @return Returns an array of the resolved instances.\r\n */\r\n public getAll = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny[] {\r\n validateKey(key);\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return _emptyParameters;\r\n }\r\n\r\n return this.parent.getAll(key);\r\n }\r\n\r\n if (resolver.strategy === 4) {\r\n const state = resolver.state;\r\n let i = state.length;\r\n const results = new Array(i);\r\n\r\n while (i--) {\r\n results[i] = state[i].get(this, key);\r\n }\r\n\r\n return results;\r\n }\r\n\r\n return [resolver.get(this, key)];\r\n }\r\n\r\n /**\r\n * Creates a new dependency injection container whose parent is the current container.\r\n * @return Returns a new container instance parented to this.\r\n */\r\n public createChild(): Container {\r\n const child = new Container(this._configuration);\r\n child.root = this.root;\r\n child.parent = this;\r\n return child;\r\n }\r\n\r\n /**\r\n * Invokes a function, recursively resolving its dependencies.\r\n * @param fn The function to invoke with the auto-resolved dependencies.\r\n * @param dynamicDependencies Additional function dependencies to use during invocation.\r\n * @return Returns the instance resulting from calling the function.\r\n */\r\n public invoke = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor,\r\n dynamicDependencies?: TArgs[number][]\r\n ): ImplOrAny {\r\n try {\r\n let handler = this._handlers.get(fn);\r\n\r\n if (handler === undefined) {\r\n handler = this._createInvocationHandler(fn);\r\n this._handlers.set(fn, handler);\r\n }\r\n\r\n return handler.invoke(this, dynamicDependencies);\r\n } catch (e) {\r\n // @ts-expect-error AggregateError returns an Error in its type hence it fails (new ...) but it's fine\r\n throw new AggregateError(\r\n `Error invoking ${fn.name}. Check the inner error for details.`,\r\n e as Error | undefined,\r\n true\r\n );\r\n }\r\n }\r\n\r\n public _createInvocationHandler\r\n = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor & { inject?: any; }\r\n ): InvocationHandler {\r\n let dependencies;\r\n\r\n if (fn.inject === undefined) {\r\n dependencies =\r\n metadata.getOwn(metadata.paramTypes, fn) || _emptyParameters;\r\n } else {\r\n dependencies = [];\r\n let ctor = fn;\r\n while (typeof ctor === 'function') {\r\n dependencies.push(...getDependencies(ctor));\r\n ctor = Object.getPrototypeOf(ctor);\r\n }\r\n }\r\n\r\n const invoker = metadata.getOwn(metadata.invoker, fn) || classInvoker;\r\n\r\n const handler = new InvocationHandler(fn, invoker, dependencies);\r\n return this._onHandlerCreated !== undefined\r\n ? this._onHandlerCreated(handler)\r\n : handler;\r\n }\r\n}\r\n\r\nexport type ResolvedValue =\r\n T extends (new (...args: any[]) => infer R)\r\n ? R\r\n : T extends (abstract new (...args: any[]) => infer R)\r\n ? R\r\n : T extends Factory\r\n ? (...args: unknown[]) => R\r\n : T extends Lazy\r\n ? () => R\r\n : T extends NewInstance\r\n ? R\r\n : T extends Optional\r\n ? R | null\r\n : T extends All\r\n ? R[]\r\n : T extends Parent\r\n ? R | null\r\n : T extends [infer T1, ...infer T2]\r\n ? [ResolvedValue, ...ResolvedValue]\r\n : T;\r\n\r\n/**\r\n * Resolve a key, or list of keys based on the current container.\r\n * \r\n * @example\r\n * ```ts\r\n * import { resolve } from 'aurelia-framework';\r\n * // or\r\n * // import { Container, resolve } from 'aurelia-dependency-injection';\r\n * \r\n * class MyCustomElement {\r\n * someService = resolve(MyService);\r\n * }\r\n * ```\r\n */\r\nexport function resolve(key: K): ResolvedValue;\r\nexport function resolve(...keys: K): ResolvedValue\r\nexport function resolve(...keys: K) {\r\n if (currentContainer == null) {\r\n throw new Error(`There is not a currently active container to resolve \"${String(keys)}\". Are you trying to \"new SomeClass(...)\" that has a resolve(...) call?`);\r\n }\r\n \r\n return keys.length === 1\r\n ? currentContainer.get(keys[0])\r\n : keys.map(containerGetKey, currentContainer);\r\n}\r\n\r\nfunction containerGetKey(this: Container, key: any) {\r\n return this.get(key);\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { DependencyCtorOrFunctor, ImplOrAny, Impl, Args, DependencyCtor, DependencyFunctor } from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom Invoker for the decorated item.\r\n */\r\nexport function invoker, TArgs extends Args>(\r\n value: Invoker\r\n): (target: DependencyCtor) => void {\r\n return target => {\r\n metadata.define(metadata.invoker, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies that the decorated item should be called as a factory\r\n * function, rather than a constructor.\r\n */\r\nexport function invokeAsFactory, TArgs extends Args>(\r\n potentialTarget?: DependencyCtor\r\n): void | ((target: DependencyCtor) => void) {\r\n const deco = (target: DependencyCtor) => {\r\n metadata.define(metadata.invoker, FactoryInvoker.instance, target);\r\n };\r\n\r\n return potentialTarget ? deco(potentialTarget) : deco;\r\n}\r\n\r\n/**\r\n * A strategy for invoking a function, resulting in an object instance.\r\n */\r\nexport interface Invoker, TArgs extends Args> {\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during\r\n * invocation.\r\n * @return The result of the function invocation.\r\n */\r\n invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny;\r\n}\r\n\r\n/**\r\n * An Invoker that is used to invoke a factory method.\r\n */\r\nexport class FactoryInvoker<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > implements Invoker {\r\n /**\r\n * The singleton instance of the FactoryInvoker.\r\n */\r\n public static instance: FactoryInvoker;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny {\r\n let i = dependencies.length;\r\n const args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(dependencies[i]);\r\n }\r\n\r\n return ((fn as DependencyFunctor).apply(undefined, args as TArgs)) as ImplOrAny;\r\n }\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(staticDependencies[i]);\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return (fn as DependencyFunctor).apply(undefined, args as TArgs) as ImplOrAny;\r\n }\r\n}\r\n\r\nFactoryInvoker.instance = new FactoryInvoker();\r\n","import './internal';\r\nimport { Resolver } from './resolvers';\r\nimport { Container } from './container';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtor,\r\n Impl,\r\n Args,\r\n DependencyCtor\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom registration strategy for the decorated\r\n * class/function.\r\n */\r\nexport function registration, TArgs extends Args>(\r\n value: Registration) {\r\n return (target: DependencyCtor) => {\r\n metadata.define(metadata.registration, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"transient\"\r\n * lifetime.\r\n */\r\nexport function transient, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor) {\r\n return registration(new TransientRegistration(key));\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"singleton\"\r\n * lifetime.\r\n */\r\nexport function singleton(registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor, registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean, registerInChild: boolean = false) {\r\n return registration(\r\n new SingletonRegistration(keyOrRegisterInChild, registerInChild)\r\n );\r\n}\r\n\r\n/**\r\n * Customizes how a particular function is resolved by the Container.\r\n */\r\nexport interface Registration<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args> {\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver;\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * transients with the container.\r\n */\r\nexport class TransientRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of TransientRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(key?: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const existingResolver = container.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? container.registerTransient(\r\n (this._key || key) as string,\r\n fn as DependencyCtorOrFunctor)\r\n : existingResolver;\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * singletons with the container.\r\n */\r\nexport class SingletonRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _registerInChild: boolean;\r\n\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of SingletonRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean,\r\n registerInChild: boolean = false) {\r\n if (typeof keyOrRegisterInChild === 'boolean') {\r\n this._registerInChild = keyOrRegisterInChild;\r\n } else {\r\n this._key = keyOrRegisterInChild;\r\n this._registerInChild = registerInChild;\r\n }\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const targetContainer = this._registerInChild ? container : container.root;\r\n const existingResolver = targetContainer.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? targetContainer.registerSingleton(this._key || key, fn)\r\n : existingResolver;\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAsCA;AACO,SAAS,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;AAC1D,IAAI,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,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,SACE,qBAAA,CAAA,oBAA+E,EAC/E,eAAgC,EAAA;AAAhC,QAAA,IAAA,eAAA,KAAA,KAAA,CAAA,EAAA,EAAA,eAAgC,GAAA,KAAA,CAAA,EAAA;AAChC,QAAA,IAAI,OAAO,oBAAoB,KAAK,SAAS,EAAE;AAC7C,YAAA,IAAI,CAAC,gBAAgB,GAAG,oBAAoB,CAAC;SAC9C;aAAM;AACL,YAAA,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;AACjC,YAAA,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;SACzC;KACF;AASM,IAAA,qBAAA,CAAA,SAAA,CAAA,gBAAgB,GAAvB,UACE,SAAoB,EACpB,GAAmD,EACnD,EAAgD,EAAA;AAEhD,QAAA,IAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC;AAC3E,QAAA,IAAM,gBAAgB,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC;QACvE,OAAO,gBAAgB,KAAK,SAAS;AACnC,cAAE,eAAe,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,EAAE,EAAE,CAAC;cACvD,gBAAgB,CAAC;KACtB,CAAA;IACH,OAAC,qBAAA,CAAA;AAAD,CAAC,EAAA;;;;","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/dist/system/aurelia-dependency-injection.js.map b/dist/system/aurelia-dependency-injection.js.map index 5c3f9c0..531e281 100644 --- a/dist/system/aurelia-dependency-injection.js.map +++ b/dist/system/aurelia-dependency-injection.js.map @@ -1 +1 @@ -{"version":3,"file":"aurelia-dependency-injection.js","sources":["../../node_modules/tslib/tslib.es6.js","../../../src/injection.ts","../../../src/resolvers.ts","../../../src/container.ts","../../../src/invokers.ts","../../../src/registrations.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","import { metadata } from 'aurelia-metadata';\r\nimport { _emptyParameters } from './container';\r\nimport { Args, Impl, DependencyCtor } from './types';\r\n\r\n// tslint:disable-next-line:ban-types\r\nexport type Injectable = Function & { inject?: any[] | (() => any[]) };\r\n\r\nfunction isInjectable(potentialTarget: any): potentialTarget is Injectable {\r\n return !!potentialTarget;\r\n}\r\n\r\n/**\r\n * Decorator: Directs the TypeScript transpiler to write-out type metadata for\r\n * the decorated class.\r\n */\r\nexport function autoinject(\r\n potentialTarget?: TPotential\r\n): TPotential extends Injectable ? void : (target: Injectable) => void {\r\n const deco = (target: Injectable): void => {\r\n if (!target.hasOwnProperty('inject')) {\r\n target.inject = (\r\n (metadata.getOwn(metadata.paramTypes, target) as any[]) ||\r\n _emptyParameters\r\n ).slice();\r\n if (target.inject && target.inject.length > 0) {\r\n // TypeScript 3.0 metadata for \"...rest\" gives type \"Object\"\r\n // if last parameter is \"Object\", assume it's a ...rest and remove that\r\n // metadata.\r\n if (target.inject[target.inject.length - 1] === Object) {\r\n target.inject.splice(-1, 1);\r\n }\r\n }\r\n }\r\n };\r\n if (isInjectable(potentialTarget)) {\r\n return deco(potentialTarget) as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n }\r\n return deco as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n}\r\n/**\r\n * Decorator: Specifies the dependencies that should be injected by the DI Container into the decorated class/function.\r\n */\r\nexport function inject<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(...rest: TArgs[number][]): any {\r\n return (\r\n target: DependencyCtor & { inject: any },\r\n _key: any,\r\n descriptor: any) => {\r\n // handle when used as a constructor parameter decorator\r\n if (typeof descriptor === 'number') {\r\n autoinject(target);\r\n if (rest.length === 1) {\r\n target.inject[descriptor] = rest[0];\r\n }\r\n return;\r\n }\r\n // if it's true then we injecting rest into function and not Class constructor\r\n if (descriptor) {\r\n const fn = descriptor.value;\r\n fn.inject = rest;\r\n } else {\r\n target.inject = rest;\r\n }\r\n };\r\n}\r\n","import { protocol } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { autoinject } from './injection';\r\nimport type {\r\n PrimitiveOrDependencyCtor,\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n DependencyCtor,\r\n DependencyFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Indicates that the decorated class/object is a custom resolver.\r\n */\r\nexport const resolver: {\r\n decorates?: (key: any) => key is { get(container: Container, key: any): any };\r\n} & (() => any) = ((protocol as unknown) as { create(...args: any[]): any }).create(\r\n 'aurelia:resolver',\r\n (target): string | boolean => {\r\n if (!(typeof target.get === 'function')) {\r\n return 'Resolvers must implement: get(container: Container, key: any): any';\r\n }\r\n\r\n return true;\r\n }\r\n);\r\n\r\n/**\r\n * Used to allow functions/classes to specify custom dependency resolution logic.\r\n */\r\nexport interface Resolver {\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n get(container: Container, key: any): any;\r\n}\r\n\r\nexport enum Strategy {\r\n instance = 0,\r\n singleton = 1,\r\n transient = 2,\r\n function = 3,\r\n array = 4,\r\n alias = 5\r\n}\r\nexport type IStrategy = 1 | 2 | 3 | 4 | 5;\r\n\r\nexport type StrategyFunctor<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > = (\r\n container?: Container,\r\n ctor?: PrimitiveOrDependencyCtorOrFunctor,\r\n strategyResolver?: any\r\n ) => TImpl;\r\n\r\nexport interface StrategyState<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > {\r\n [Strategy.instance]: TImpl;\r\n [Strategy.singleton]: DependencyCtorOrFunctor;\r\n [Strategy.transient]: DependencyCtorOrFunctor;\r\n [Strategy.function]: StrategyFunctor;\r\n /**\r\n * For typings purposes, this is done as ({ get: StrategyFunctor } | TImpl)[]\r\n * But it should be understood, and used as [{ get: StrategyFunctor }, ...TImp[]]\r\n */\r\n [Strategy.array]: ({\r\n get: (\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor\r\n ) => TImpl\r\n } | TImpl)[];\r\n [Strategy.alias]: any;\r\n}\r\n\r\nfunction isStrategy<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TKey extends keyof StrategyState\r\n>(\r\n actual: Strategy,\r\n expected: TKey,\r\n state):\r\n state is StrategyState[TKey] {\r\n return actual === expected;\r\n}\r\n/**\r\n * Used to resolve instances, singletons, transients, aliases\r\n */\r\n@resolver()\r\nexport class StrategyResolver<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TStrategyKey extends keyof StrategyState> {\r\n\r\n public strategy: keyof StrategyState;\r\n public state: StrategyState[keyof StrategyState];\r\n\r\n /**\r\n * Creates an instance of the StrategyResolver class.\r\n * @param strategy The type of resolution strategy.\r\n * @param state The state associated with the resolution strategy.\r\n */\r\n constructor(strategy: TStrategyKey, state: StrategyState[TStrategyKey]) {\r\n this.strategy = strategy;\r\n this.state = state;\r\n }\r\n\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n public get(container: Container, key: PrimitiveOrDependencyCtor) {\r\n if (isStrategy(this.strategy, Strategy.instance, this.state)) {\r\n return this.state;\r\n }\r\n if (isStrategy(this.strategy, Strategy.singleton, this.state)) {\r\n const singleton = container.invoke(this.state);\r\n this.state = singleton;\r\n this.strategy = 0;\r\n return singleton;\r\n }\r\n if (isStrategy(this.strategy, Strategy.transient, this.state)) {\r\n return container.invoke(this.state);\r\n }\r\n if (isStrategy(this.strategy, Strategy.function, this.state)) {\r\n return this.state(container, key, this);\r\n }\r\n if (isStrategy(this.strategy, Strategy.array, this.state)) {\r\n return (this.state[0] as { get: StrategyFunctor }).get(container, key);\r\n }\r\n if (isStrategy(this.strategy, Strategy.alias, this.state)) {\r\n return container.get(this.state) as TImpl;\r\n }\r\n throw new Error('Invalid strategy: ' + this.strategy);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify lazy resolution logic.\r\n */\r\n@resolver()\r\nexport class Lazy = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'lazy';\r\n\r\n /**\r\n * Creates an instance of the Lazy class.\r\n * @param key The key to lazily resolve.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to lazily resolve the dependency into a lazy locator\r\n * function.\r\n * @param container The container to resolve from.\r\n * @return Returns a function which can be invoked at a later time to obtain\r\n * the actual dependency.\r\n */\r\n public get(container: Container): () => ImplOrAny {\r\n return () => container.get(this._key);\r\n }\r\n\r\n /**\r\n * Creates a Lazy Resolver for the supplied key.\r\n * @param key The key to lazily resolve.\r\n * @return Returns an instance of Lazy for the key.\r\n */\r\n public static of<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ) {\r\n return new Lazy(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify resolution of all matches to a key.\r\n */\r\n@resolver()\r\nexport class All = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'all';\r\n\r\n /**\r\n * Creates an instance of the All class.\r\n * @param key The key to lazily resolve all matches for.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to resolve all matching dependencies as an array of\r\n * instances.\r\n * @param container The container to resolve from.\r\n * @return Returns an array of all matching instances.\r\n */\r\n public get(container: Container): TImpl[] {\r\n return container.getAll(this._key);\r\n }\r\n\r\n /**\r\n * Creates an All Resolver for the supplied key.\r\n * @param key The key to resolve all instances for.\r\n * @return Returns an instance of All for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): All {\r\n return new All(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify an optional dependency, which will\r\n * be resolved only if already registred with the container.\r\n */\r\n@resolver()\r\nexport class Optional = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /** @internal */\r\n public _checkParent: boolean;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'optional';\r\n\r\n /**\r\n * Creates an instance of the Optional class.\r\n * @param key The key to optionally resolve for.\r\n * @param checkParent Indicates whether or not the parent container hierarchy\r\n * should be checked.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor, checkParent: boolean = true) {\r\n this._key = key;\r\n this._checkParent = checkParent;\r\n }\r\n\r\n /**\r\n * Called by the container to provide optional resolution of the key.\r\n * @param container The container to resolve from.\r\n * @return Returns the instance if found; otherwise null.\r\n */\r\n public get(container: Container): TImpl | null {\r\n if (container.hasResolver(this._key, this._checkParent)) {\r\n return container.get(this._key);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Creates an Optional Resolver for the supplied key.\r\n * @param key The key to optionally resolve for.\r\n * @param [checkParent=true] Indicates whether or not the parent container\r\n * hierarchy should be checked.\r\n * @return Returns an instance of Optional for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n checkParent: boolean = true): Optional {\r\n return new Optional(key, checkParent);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject the dependency from the parent container instead of the current\r\n * one.\r\n */\r\n@resolver()\r\nexport class Parent = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'parent';\r\n\r\n /**\r\n * Creates an instance of the Parent class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to load the dependency from the parent container\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container): TImpl | null {\r\n return container.parent ? container.parent.get(this._key) : null;\r\n }\r\n\r\n /**\r\n * Creates a Parent Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Parent for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): Parent {\r\n return new Parent(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow injecting dependencies but also passing data to the constructor.\r\n */\r\n@resolver()\r\nexport class Factory = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtorOrFunctor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'factory';\r\n\r\n /**\r\n * Creates an instance of the Factory class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to pass the dependencies to the constructor.\r\n * @param container The container to invoke the constructor with dependencies\r\n * and other parameters.\r\n * @return Returns a function that can be invoked to resolve dependencies\r\n * later, and the rest of the parameters.\r\n */\r\n public get(container: Container): DependencyFunctor {\r\n let fn = this._key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === Strategy.function) {\r\n fn = resolver.state;\r\n }\r\n\r\n return (...rest) => container.invoke(fn as DependencyCtorOrFunctor, rest);\r\n }\r\n\r\n /**\r\n * Creates a Factory Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Factory for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: DependencyCtor\r\n ): Factory {\r\n return new Factory(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject a new instance of a dependency, without regard for existing\r\n * instances in the container. Instances can optionally be registered in the\r\n * container\r\n * under a different key by supplying a key using the `as` method.\r\n */\r\n@resolver()\r\nexport class NewInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public key: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public asKey: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public dynamicDependencies: TArgs[number][];\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'newInstance';\r\n\r\n /**\r\n * Creates an instance of the NewInstance class.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor, ...dynamicDependencies: TArgs[number][]) {\r\n this.key = key;\r\n this.asKey = key;\r\n this.dynamicDependencies = dynamicDependencies;\r\n }\r\n\r\n /**\r\n * Called by the container to instantiate the dependency and potentially\r\n * register\r\n * as another key if the `as` method was used.\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container) {\r\n const dynamicDependencies =\r\n this.dynamicDependencies.length > 0\r\n ? this.dynamicDependencies.map(dependency =>\r\n dependency['protocol:aurelia:resolver']\r\n ? dependency.get(container)\r\n : container.get(dependency)\r\n )\r\n : undefined;\r\n\r\n let fn = this.key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === 3) {\r\n fn = resolver.state;\r\n }\r\n\r\n const instance = container.invoke(fn as DependencyCtorOrFunctor, dynamicDependencies);\r\n container.registerInstance(this.asKey, instance);\r\n return instance;\r\n }\r\n\r\n /**\r\n * Instructs the NewInstance resolver to register the resolved instance using\r\n * the supplied key.\r\n * @param key The key to register the instance with.\r\n * @return Returns the NewInstance resolver.\r\n */\r\n public as(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this.asKey = key;\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates an NewInstance Resolver for the supplied key.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n * @return Returns an instance of NewInstance for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtorOrFunctor,\r\n ...dynamicDependencies: TArgs[number][]): NewInstance {\r\n return new NewInstance(key, ...dynamicDependencies);\r\n }\r\n}\r\n\r\n/**\r\n * Used by parameter decorators to call autoinject for the target and retrieve\r\n * the target's inject property.\r\n * @param target The target class.\r\n * @return Returns the target's own inject property.\r\n */\r\nexport function getDecoratorDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] }\r\n ) {\r\n autoinject(target);\r\n\r\n return target.inject;\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should be lazy loaded\r\n */\r\nexport function lazy<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: { new (...args: TArgs): TBase | TImpl },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Lazy.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should load all instances of the given\r\n * key.\r\n */\r\nexport function all<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = All.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as optional\r\n */\r\nexport function optional<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n checkParentOrTarget: boolean = true) {\r\n const deco = (checkParent: boolean) => {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Optional.of(inject[index], checkParent);\r\n };\r\n };\r\n if (typeof checkParentOrTarget === 'boolean') {\r\n return deco(checkParentOrTarget);\r\n }\r\n return deco(true);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to look at the parent container for\r\n * resolution\r\n */\r\nexport function parent<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Parent.of(inject[index]);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to create a factory method, that can\r\n * accept optional arguments\r\n */\r\nexport function factory<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Factory.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as a new instance. Instances can optionally be registered in the container\r\n * under a different key and/or use dynamic dependencies\r\n */\r\nexport function newInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n asKeyOrTarget?: PrimitiveOrDependencyCtor & { inject?: TArgs[number][] },\r\n ...dynamicDependencies: TArgs[number][]\r\n) {\r\n const deco = (asKey?: typeof asKeyOrTarget) => {\r\n return (\r\n target: { new (...args: any[]): any },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = NewInstance.of(inject[index], ...dynamicDependencies);\r\n if (!!asKey) {\r\n inject[index].as(asKey);\r\n }\r\n };\r\n };\r\n if (arguments.length >= 1) {\r\n return deco(asKeyOrTarget);\r\n }\r\n return deco();\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { AggregateError } from 'aurelia-pal';\r\nimport { resolver, StrategyResolver, Resolver, Strategy, StrategyState, Factory, NewInstance, Lazy, Optional, All, Parent } from './resolvers';\r\nimport { Invoker } from './invokers';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n DependencyCtor,\r\n PrimitiveOrDependencyCtor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args,\r\n Primitive\r\n} from './types';\r\n\r\nlet currentContainer: Container | null = null;\r\n\r\nfunction validateKey(key: any) {\r\n if (key === null || key === undefined) {\r\n throw new Error(\r\n 'key/value cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport const _emptyParameters = Object.freeze([]) as [];\r\n\r\nmetadata.registration = 'aurelia:registration';\r\nmetadata.invoker = 'aurelia:invoker';\r\n\r\nconst resolverDecorates = resolver.decorates!;\r\n\r\n/**\r\n * Stores the information needed to invoke a function.\r\n */\r\nexport class InvocationHandler<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args\r\n > {\r\n /**\r\n * The function to be invoked by this handler.\r\n */\r\n public fn: DependencyCtorOrFunctor;\r\n\r\n /**\r\n * The invoker implementation that will be used to actually invoke the function.\r\n */\r\n public invoker: Invoker;\r\n\r\n /**\r\n * The statically known dependencies of this function invocation.\r\n */\r\n public dependencies: TArgs;\r\n\r\n /**\r\n * Instantiates an InvocationDescription.\r\n * @param fn The Function described by this description object.\r\n * @param invoker The strategy for invoking the function.\r\n * @param dependencies The static dependencies of the function call.\r\n */\r\n constructor(\r\n fn: DependencyCtorOrFunctor,\r\n invoker: Invoker,\r\n dependencies: TArgs\r\n ) {\r\n this.fn = fn;\r\n this.invoker = invoker;\r\n this.dependencies = dependencies;\r\n }\r\n\r\n /**\r\n * Invokes the function.\r\n * @param container The calling container.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(container: Container, dynamicDependencies?: TArgs[]): TImpl {\r\n const previousContainer = currentContainer;\r\n currentContainer = container;\r\n try {\r\n return dynamicDependencies !== undefined\r\n ? this.invoker.invokeWithDynamicDependencies(\r\n container,\r\n this.fn,\r\n this.dependencies,\r\n dynamicDependencies\r\n )\r\n : this.invoker.invoke(container, this.fn, this.dependencies);\r\n } finally {\r\n currentContainer = previousContainer;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Used to configure a Container instance.\r\n */\r\nexport interface ContainerConfiguration {\r\n /**\r\n * An optional callback which will be called when any function needs an\r\n * InvocationHandler created (called once per Function).\r\n */\r\n onHandlerCreated?: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n handlers?: Map;\r\n}\r\n\r\nfunction invokeWithDynamicDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n) {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n let lookup;\r\n\r\n while (i--) {\r\n lookup = staticDependencies[i];\r\n\r\n if (lookup === null || lookup === undefined) {\r\n throw new Error(\r\n 'Constructor Parameter with index ' +\r\n i +\r\n ' cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n } else {\r\n args[i] = container.get(lookup);\r\n }\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return Reflect.construct(fn, args);\r\n}\r\n\r\nconst classInvoker: Invoker = {\r\n invoke(container, Type: DependencyCtor, deps) {\r\n const instances = deps.map((dep) => container.get(dep));\r\n return Reflect.construct(Type, instances);\r\n },\r\n invokeWithDynamicDependencies\r\n};\r\n\r\nfunction getDependencies(f) {\r\n if (!f.hasOwnProperty('inject')) {\r\n return [];\r\n }\r\n\r\n if (typeof f.inject === 'function') {\r\n return f.inject();\r\n }\r\n\r\n return f.inject;\r\n}\r\n\r\n/**\r\n * A lightweight, extensible dependency injection container.\r\n */\r\nexport class Container {\r\n /**\r\n * The global root Container instance. Available if makeGlobal() has been\r\n * called. Aurelia Framework calls makeGlobal().\r\n */\r\n public static instance: Container;\r\n\r\n /**\r\n * The parent container in the DI hierarchy.\r\n */\r\n public parent: Container | null;\r\n\r\n /**\r\n * The root container in the DI hierarchy.\r\n */\r\n public root: Container;\r\n\r\n /** @internal */\r\n public _configuration: ContainerConfiguration;\r\n\r\n /** @internal */\r\n public _onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n /** @internal */\r\n public _handlers: Map;\r\n\r\n /** @internal */\r\n public _resolvers: Map;\r\n\r\n /**\r\n * Creates an instance of Container.\r\n * @param configuration Provides some configuration for the new Container instance.\r\n */\r\n constructor(configuration?: ContainerConfiguration) {\r\n if (configuration === undefined) {\r\n configuration = {};\r\n }\r\n\r\n this._configuration = configuration;\r\n this._onHandlerCreated = configuration.onHandlerCreated!;\r\n this._handlers =\r\n configuration.handlers || (configuration.handlers = new Map());\r\n this._resolvers = new Map();\r\n this.root = this;\r\n this.parent = null;\r\n }\r\n\r\n /**\r\n * Makes this container instance globally reachable through Container.instance.\r\n */\r\n public makeGlobal(): Container {\r\n Container.instance = this;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets an invocation handler creation callback that will be called when new\r\n * InvocationsHandlers are created (called once per Function).\r\n * @param onHandlerCreated The callback to be called when an\r\n * InvocationsHandler is created.\r\n */\r\n public setHandlerCreatedCallback<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler\r\n ) {\r\n this._onHandlerCreated = onHandlerCreated;\r\n this._configuration.onHandlerCreated = onHandlerCreated;\r\n }\r\n\r\n /**\r\n * Registers an existing object instance with the container.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param instance The instance that will be resolved when the key is matched.\r\n * This defaults to the key value when instance is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerInstance = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n instance?: TImpl): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(0, instance === undefined ? key : instance)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container always\r\n * returns the same instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.singleton, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container returns a\r\n * new instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(2, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param handler The resolution function to use when the dependency is\r\n * needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerHandler = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n handler: (container?: Container, key?: PrimitiveOrDependencyCtor, resolver?: Resolver) => any\r\n ): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.function, handler)\r\n );\r\n }\r\n\r\n /**\r\n * Registers an additional key that serves as an alias to the original DI key.\r\n * @param originalKey The key that originally identified the dependency; usually a constructor function.\r\n * @param aliasKey An alternate key which can also be used to resolve the same dependency as the original.\r\n * @return The resolver that was registered.\r\n */\r\n public registerAlias = Impl, TArgs extends Args = Args>(\r\n originalKey: PrimitiveOrDependencyCtor,\r\n aliasKey: PrimitiveOrDependencyCtor): Resolver {\r\n return this.registerResolver(\r\n aliasKey,\r\n new StrategyResolver(5, originalKey)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param resolver The resolver to use when the dependency is needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n resolver: Resolver\r\n ): Resolver {\r\n validateKey(key);\r\n\r\n const allResolvers = this._resolvers;\r\n const result = allResolvers.get(key);\r\n\r\n if (result === undefined) {\r\n allResolvers.set(key, resolver);\r\n } else if (result.strategy === 4) {\r\n result.state.push(resolver);\r\n } else {\r\n allResolvers.set(key, new StrategyResolver(4, [result, resolver]));\r\n }\r\n\r\n return resolver;\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) by inspecting its registration\r\n * annotations. If none are found, then the default singleton registration is\r\n * used.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n */\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n fn = fn === undefined ? key as DependencyCtor : fn;\r\n\r\n if (typeof fn === 'function') {\r\n const registration = metadata.get(metadata.registration, fn);\r\n\r\n if (registration === undefined) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn));\r\n }\r\n\r\n return registration.registerResolver(this, key, fn);\r\n }\r\n\r\n return this.registerResolver(key, new StrategyResolver(0, fn));\r\n }\r\n\r\n /**\r\n * Registers an array of types (constructor functions) by inspecting their\r\n * registration annotations. If none are found, then the default singleton\r\n * registration is used.\r\n * @param fns The constructor function to use when the dependency needs to be instantiated.\r\n */\r\n public autoRegisterAll(fns: DependencyCtor[]): void {\r\n let i = fns.length;\r\n while (i--) {\r\n this.autoRegister(fns[i]);\r\n }\r\n }\r\n\r\n /**\r\n * Unregisters based on key.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n */\r\n public unregister(key: any): void {\r\n this._resolvers.delete(key);\r\n }\r\n\r\n /**\r\n * Inspects the container to determine if a particular key has been registred.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @param checkParent Indicates whether or not to check the parent container hierarchy.\r\n * @return Returns true if the key has been registred; false otherwise.\r\n */\r\n public hasResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, checkParent: boolean = false): boolean {\r\n validateKey(key);\r\n\r\n return (\r\n this._resolvers.has(key) ||\r\n (checkParent &&\r\n this.parent !== null &&\r\n this.parent.hasResolver(key, checkParent))\r\n );\r\n }\r\n\r\n /**\r\n * Gets the resolver for the particular key, if it has been registered.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @return Returns the resolver, if registred, otherwise undefined.\r\n */\r\n public getResolver<\r\n TStrategyKey extends keyof StrategyState,\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n >(\r\n key: PrimitiveOrDependencyCtorOrFunctor\r\n ): StrategyResolver {\r\n return this._resolvers.get(key);\r\n }\r\n\r\n /**\r\n * Resolves a single instance based on the provided key.\r\n * @param key The key that identifies the object to resolve.\r\n * @return Returns the resolved instance.\r\n */\r\n public get | Lazy | Factory | Optional | Parent | All>(\r\n key: TResolver): ResolvedValue;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: typeof Container): Container;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor | typeof Container): ImplOrAny | Container {\r\n validateKey(key);\r\n\r\n if (key === Container) {\r\n return this;\r\n }\r\n\r\n if (resolverDecorates(key)) {\r\n return key.get(this, key);\r\n }\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key as DependencyCtor).get(this, key);\r\n }\r\n\r\n const registration = metadata.get(metadata.registration, key);\r\n\r\n if (registration === undefined) {\r\n return this.parent._get(key);\r\n }\r\n\r\n return registration.registerResolver(\r\n this, key, key as DependencyCtorOrFunctor).get(this, key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n public _get(key) {\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n\r\n return this.parent._get(key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n /**\r\n * Resolves all instance registered under the provided key.\r\n * @param key The key that identifies the objects to resolve.\r\n * @return Returns an array of the resolved instances.\r\n */\r\n public getAll = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny[] {\r\n validateKey(key);\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return _emptyParameters;\r\n }\r\n\r\n return this.parent.getAll(key);\r\n }\r\n\r\n if (resolver.strategy === 4) {\r\n const state = resolver.state;\r\n let i = state.length;\r\n const results = new Array(i);\r\n\r\n while (i--) {\r\n results[i] = state[i].get(this, key);\r\n }\r\n\r\n return results;\r\n }\r\n\r\n return [resolver.get(this, key)];\r\n }\r\n\r\n /**\r\n * Creates a new dependency injection container whose parent is the current container.\r\n * @return Returns a new container instance parented to this.\r\n */\r\n public createChild(): Container {\r\n const child = new Container(this._configuration);\r\n child.root = this.root;\r\n child.parent = this;\r\n return child;\r\n }\r\n\r\n /**\r\n * Invokes a function, recursively resolving its dependencies.\r\n * @param fn The function to invoke with the auto-resolved dependencies.\r\n * @param dynamicDependencies Additional function dependencies to use during invocation.\r\n * @return Returns the instance resulting from calling the function.\r\n */\r\n public invoke = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor,\r\n dynamicDependencies?: TArgs[number][]\r\n ): ImplOrAny {\r\n try {\r\n let handler = this._handlers.get(fn);\r\n\r\n if (handler === undefined) {\r\n handler = this._createInvocationHandler(fn);\r\n this._handlers.set(fn, handler);\r\n }\r\n\r\n return handler.invoke(this, dynamicDependencies);\r\n } catch (e) {\r\n // @ts-expect-error AggregateError returns an Error in its type hence it fails (new ...) but it's fine\r\n throw new AggregateError(\r\n `Error invoking ${fn.name}. Check the inner error for details.`,\r\n e as Error | undefined,\r\n true\r\n );\r\n }\r\n }\r\n\r\n public _createInvocationHandler\r\n = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor & { inject?: any; }\r\n ): InvocationHandler {\r\n let dependencies;\r\n\r\n if (fn.inject === undefined) {\r\n dependencies =\r\n metadata.getOwn(metadata.paramTypes, fn) || _emptyParameters;\r\n } else {\r\n dependencies = [];\r\n let ctor = fn;\r\n while (typeof ctor === 'function') {\r\n dependencies.push(...getDependencies(ctor));\r\n ctor = Object.getPrototypeOf(ctor);\r\n }\r\n }\r\n\r\n const invoker = metadata.getOwn(metadata.invoker, fn) || classInvoker;\r\n\r\n const handler = new InvocationHandler(fn, invoker, dependencies);\r\n return this._onHandlerCreated !== undefined\r\n ? this._onHandlerCreated(handler)\r\n : handler;\r\n }\r\n}\r\n\r\nexport type ResolvedValue =\r\n T extends { new (...args: any[]): infer R }\r\n ? R\r\n : T extends Factory\r\n ? (...args: unknown[]) => R\r\n : T extends Lazy\r\n ? () => R\r\n : T extends NewInstance\r\n ? R\r\n : T extends Optional\r\n ? R | null\r\n : T extends All\r\n ? R[]\r\n : T extends Parent\r\n ? R | null\r\n : T extends [infer T1, ...infer T2]\r\n ? [ResolvedValue, ...ResolvedValue]\r\n : T;\r\n\r\n/**\r\n * Resolve a key, or list of keys based on the current container.\r\n * \r\n * @example\r\n * ```ts\r\n * import { resolve } from 'aurelia-framework';\r\n * // or\r\n * // import { Container, resolve } from 'aurelia-dependency-injection';\r\n * \r\n * class MyCustomElement {\r\n * someService = resolve(MyService);\r\n * }\r\n * ```\r\n */\r\nexport function resolve(key: K): ResolvedValue;\r\nexport function resolve(...keys: K): ResolvedValue\r\nexport function resolve(...keys: K) {\r\n if (currentContainer == null) {\r\n throw new Error(`There is not a currently active container to resolve \"${String(keys)}\". Are you trying to \"new SomeClass(...)\" that has a resolve(...) call?`);\r\n }\r\n \r\n return keys.length === 1\r\n ? currentContainer.get(keys[0])\r\n : keys.map(containerGetKey, currentContainer);\r\n}\r\n\r\nfunction containerGetKey(this: Container, key: any) {\r\n return this.get(key);\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { DependencyCtorOrFunctor, ImplOrAny, Impl, Args, DependencyCtor, DependencyFunctor } from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom Invoker for the decorated item.\r\n */\r\nexport function invoker, TArgs extends Args>(\r\n value: Invoker\r\n): (target: DependencyCtor) => void {\r\n return target => {\r\n metadata.define(metadata.invoker, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies that the decorated item should be called as a factory\r\n * function, rather than a constructor.\r\n */\r\nexport function invokeAsFactory, TArgs extends Args>(\r\n potentialTarget?: DependencyCtor\r\n): void | ((target: DependencyCtor) => void) {\r\n const deco = (target: DependencyCtor) => {\r\n metadata.define(metadata.invoker, FactoryInvoker.instance, target);\r\n };\r\n\r\n return potentialTarget ? deco(potentialTarget) : deco;\r\n}\r\n\r\n/**\r\n * A strategy for invoking a function, resulting in an object instance.\r\n */\r\nexport interface Invoker, TArgs extends Args> {\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during\r\n * invocation.\r\n * @return The result of the function invocation.\r\n */\r\n invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny;\r\n}\r\n\r\n/**\r\n * An Invoker that is used to invoke a factory method.\r\n */\r\nexport class FactoryInvoker<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > implements Invoker {\r\n /**\r\n * The singleton instance of the FactoryInvoker.\r\n */\r\n public static instance: FactoryInvoker;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny {\r\n let i = dependencies.length;\r\n const args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(dependencies[i]);\r\n }\r\n\r\n return ((fn as DependencyFunctor).apply(undefined, args as TArgs)) as ImplOrAny;\r\n }\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(staticDependencies[i]);\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return (fn as DependencyFunctor).apply(undefined, args as TArgs) as ImplOrAny;\r\n }\r\n}\r\n\r\nFactoryInvoker.instance = new FactoryInvoker();\r\n","import './internal';\r\nimport { Resolver } from './resolvers';\r\nimport { Container } from './container';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtor,\r\n Impl,\r\n Args,\r\n DependencyCtor\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom registration strategy for the decorated\r\n * class/function.\r\n */\r\nexport function registration, TArgs extends Args>(\r\n value: Registration) {\r\n return (target: DependencyCtor) => {\r\n metadata.define(metadata.registration, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"transient\"\r\n * lifetime.\r\n */\r\nexport function transient, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor) {\r\n return registration(new TransientRegistration(key));\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"singleton\"\r\n * lifetime.\r\n */\r\nexport function singleton(registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor, registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean, registerInChild: boolean = false) {\r\n return registration(\r\n new SingletonRegistration(keyOrRegisterInChild, registerInChild)\r\n );\r\n}\r\n\r\n/**\r\n * Customizes how a particular function is resolved by the Container.\r\n */\r\nexport interface Registration<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args> {\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver;\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * transients with the container.\r\n */\r\nexport class TransientRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of TransientRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(key?: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const existingResolver = container.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? container.registerTransient(\r\n (this._key || key) as string,\r\n fn as DependencyCtorOrFunctor)\r\n : existingResolver;\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * singletons with the container.\r\n */\r\nexport class SingletonRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _registerInChild: boolean;\r\n\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of SingletonRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean,\r\n registerInChild: boolean = false) {\r\n if (typeof keyOrRegisterInChild === 'boolean') {\r\n this._registerInChild = keyOrRegisterInChild;\r\n } else {\r\n this._key = keyOrRegisterInChild;\r\n this._registerInChild = registerInChild;\r\n }\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const targetContainer = this._registerInChild ? container : container.root;\r\n const existingResolver = targetContainer.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? targetContainer.registerSingleton(this._key || key, fn)\r\n : existingResolver;\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAAA;YACA;AACA;YACA;YACA;AACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;AACA;AAsCA;YACO,SAAS,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;YAC1D,IAAI,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;YACjI,IAAI,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;YACnI,SAAS,KAAK,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,GA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AAA,IAAI,CAAC,gBAAgB,GAAG,oBAAoB,CAAC;qBAC9C;yBAAM;YACL,YAAA,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;YACjC,YAAA,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;qBACzC;iBACF;YASM,IAAA,qBAAA,CAAA,SAAA,CAAA,gBAAgB,GAAvB,UACE,SAAoB,EACpB,GAAmD,EACnD,EAAgD,EAAA;YAEhD,QAAA,IAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC;YAC3E,QAAA,IAAM,gBAAgB,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC;oBACvE,OAAO,gBAAgB,KAAK,SAAS;YACnC,cAAE,eAAe,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,EAAE,EAAE,CAAC;0BACvD,gBAAgB,CAAC;iBACtB,CAAA;gBACH,OAAC,qBAAA,CAAA;YAAD,CAAC,EAAA;;;;;;;;","x_google_ignoreList":[0]} \ No newline at end of file +{"version":3,"file":"aurelia-dependency-injection.js","sources":["../../node_modules/tslib/tslib.es6.js","../../../src/injection.ts","../../../src/resolvers.ts","../../../src/container.ts","../../../src/invokers.ts","../../../src/registrations.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","import { metadata } from 'aurelia-metadata';\r\nimport { _emptyParameters } from './container';\r\nimport { Args, Impl, DependencyCtor } from './types';\r\n\r\n// tslint:disable-next-line:ban-types\r\nexport type Injectable = Function & { inject?: any[] | (() => any[]) };\r\n\r\nfunction isInjectable(potentialTarget: any): potentialTarget is Injectable {\r\n return !!potentialTarget;\r\n}\r\n\r\n/**\r\n * Decorator: Directs the TypeScript transpiler to write-out type metadata for\r\n * the decorated class.\r\n */\r\nexport function autoinject(\r\n potentialTarget?: TPotential\r\n): TPotential extends Injectable ? void : (target: Injectable) => void {\r\n const deco = (target: Injectable): void => {\r\n if (!target.hasOwnProperty('inject')) {\r\n target.inject = (\r\n (metadata.getOwn(metadata.paramTypes, target) as any[]) ||\r\n _emptyParameters\r\n ).slice();\r\n if (target.inject && target.inject.length > 0) {\r\n // TypeScript 3.0 metadata for \"...rest\" gives type \"Object\"\r\n // if last parameter is \"Object\", assume it's a ...rest and remove that\r\n // metadata.\r\n if (target.inject[target.inject.length - 1] === Object) {\r\n target.inject.splice(-1, 1);\r\n }\r\n }\r\n }\r\n };\r\n if (isInjectable(potentialTarget)) {\r\n return deco(potentialTarget) as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n }\r\n return deco as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n}\r\n/**\r\n * Decorator: Specifies the dependencies that should be injected by the DI Container into the decorated class/function.\r\n */\r\nexport function inject<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(...rest: TArgs[number][]): any {\r\n return (\r\n target: DependencyCtor & { inject: any },\r\n _key: any,\r\n descriptor: any) => {\r\n // handle when used as a constructor parameter decorator\r\n if (typeof descriptor === 'number') {\r\n autoinject(target);\r\n if (rest.length === 1) {\r\n target.inject[descriptor] = rest[0];\r\n }\r\n return;\r\n }\r\n // if it's true then we injecting rest into function and not Class constructor\r\n if (descriptor) {\r\n const fn = descriptor.value;\r\n fn.inject = rest;\r\n } else {\r\n target.inject = rest;\r\n }\r\n };\r\n}\r\n","import { protocol } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { autoinject } from './injection';\r\nimport type {\r\n PrimitiveOrDependencyCtor,\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n DependencyCtor,\r\n DependencyFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Indicates that the decorated class/object is a custom resolver.\r\n */\r\nexport const resolver: {\r\n decorates?: (key: any) => key is { get(container: Container, key: any): any };\r\n} & (() => any) = ((protocol as unknown) as { create(...args: any[]): any }).create(\r\n 'aurelia:resolver',\r\n (target): string | boolean => {\r\n if (!(typeof target.get === 'function')) {\r\n return 'Resolvers must implement: get(container: Container, key: any): any';\r\n }\r\n\r\n return true;\r\n }\r\n);\r\n\r\n/**\r\n * Used to allow functions/classes to specify custom dependency resolution logic.\r\n */\r\nexport interface Resolver {\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n get(container: Container, key: any): any;\r\n}\r\n\r\nexport enum Strategy {\r\n instance = 0,\r\n singleton = 1,\r\n transient = 2,\r\n function = 3,\r\n array = 4,\r\n alias = 5\r\n}\r\nexport type IStrategy = 1 | 2 | 3 | 4 | 5;\r\n\r\nexport type StrategyFunctor<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > = (\r\n container?: Container,\r\n ctor?: PrimitiveOrDependencyCtorOrFunctor,\r\n strategyResolver?: any\r\n ) => TImpl;\r\n\r\nexport interface StrategyState<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > {\r\n [Strategy.instance]: TImpl;\r\n [Strategy.singleton]: DependencyCtorOrFunctor;\r\n [Strategy.transient]: DependencyCtorOrFunctor;\r\n [Strategy.function]: StrategyFunctor;\r\n /**\r\n * For typings purposes, this is done as ({ get: StrategyFunctor } | TImpl)[]\r\n * But it should be understood, and used as [{ get: StrategyFunctor }, ...TImp[]]\r\n */\r\n [Strategy.array]: ({\r\n get: (\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor\r\n ) => TImpl\r\n } | TImpl)[];\r\n [Strategy.alias]: any;\r\n}\r\n\r\nfunction isStrategy<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TKey extends keyof StrategyState\r\n>(\r\n actual: Strategy,\r\n expected: TKey,\r\n state):\r\n state is StrategyState[TKey] {\r\n return actual === expected;\r\n}\r\n/**\r\n * Used to resolve instances, singletons, transients, aliases\r\n */\r\n@resolver()\r\nexport class StrategyResolver<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TStrategyKey extends keyof StrategyState> {\r\n\r\n public strategy: keyof StrategyState;\r\n public state: StrategyState[keyof StrategyState];\r\n\r\n /**\r\n * Creates an instance of the StrategyResolver class.\r\n * @param strategy The type of resolution strategy.\r\n * @param state The state associated with the resolution strategy.\r\n */\r\n constructor(strategy: TStrategyKey, state: StrategyState[TStrategyKey]) {\r\n this.strategy = strategy;\r\n this.state = state;\r\n }\r\n\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n public get(container: Container, key: PrimitiveOrDependencyCtor) {\r\n if (isStrategy(this.strategy, Strategy.instance, this.state)) {\r\n return this.state;\r\n }\r\n if (isStrategy(this.strategy, Strategy.singleton, this.state)) {\r\n const singleton = container.invoke(this.state);\r\n this.state = singleton;\r\n this.strategy = 0;\r\n return singleton;\r\n }\r\n if (isStrategy(this.strategy, Strategy.transient, this.state)) {\r\n return container.invoke(this.state);\r\n }\r\n if (isStrategy(this.strategy, Strategy.function, this.state)) {\r\n return this.state(container, key, this);\r\n }\r\n if (isStrategy(this.strategy, Strategy.array, this.state)) {\r\n return (this.state[0] as { get: StrategyFunctor }).get(container, key);\r\n }\r\n if (isStrategy(this.strategy, Strategy.alias, this.state)) {\r\n return container.get(this.state) as TImpl;\r\n }\r\n throw new Error('Invalid strategy: ' + this.strategy);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify lazy resolution logic.\r\n */\r\n@resolver()\r\nexport class Lazy = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'lazy';\r\n\r\n /**\r\n * Creates an instance of the Lazy class.\r\n * @param key The key to lazily resolve.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to lazily resolve the dependency into a lazy locator\r\n * function.\r\n * @param container The container to resolve from.\r\n * @return Returns a function which can be invoked at a later time to obtain\r\n * the actual dependency.\r\n */\r\n public get(container: Container): () => ImplOrAny {\r\n return () => container.get(this._key);\r\n }\r\n\r\n /**\r\n * Creates a Lazy Resolver for the supplied key.\r\n * @param key The key to lazily resolve.\r\n * @return Returns an instance of Lazy for the key.\r\n */\r\n public static of<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ) {\r\n return new Lazy(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify resolution of all matches to a key.\r\n */\r\n@resolver()\r\nexport class All = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'all';\r\n\r\n /**\r\n * Creates an instance of the All class.\r\n * @param key The key to lazily resolve all matches for.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to resolve all matching dependencies as an array of\r\n * instances.\r\n * @param container The container to resolve from.\r\n * @return Returns an array of all matching instances.\r\n */\r\n public get(container: Container): TImpl[] {\r\n return container.getAll(this._key);\r\n }\r\n\r\n /**\r\n * Creates an All Resolver for the supplied key.\r\n * @param key The key to resolve all instances for.\r\n * @return Returns an instance of All for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): All {\r\n return new All(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify an optional dependency, which will\r\n * be resolved only if already registred with the container.\r\n */\r\n@resolver()\r\nexport class Optional = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /** @internal */\r\n public _checkParent: boolean;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'optional';\r\n\r\n /**\r\n * Creates an instance of the Optional class.\r\n * @param key The key to optionally resolve for.\r\n * @param checkParent Indicates whether or not the parent container hierarchy\r\n * should be checked.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor, checkParent: boolean = true) {\r\n this._key = key;\r\n this._checkParent = checkParent;\r\n }\r\n\r\n /**\r\n * Called by the container to provide optional resolution of the key.\r\n * @param container The container to resolve from.\r\n * @return Returns the instance if found; otherwise null.\r\n */\r\n public get(container: Container): TImpl | null {\r\n if (container.hasResolver(this._key, this._checkParent)) {\r\n return container.get(this._key);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Creates an Optional Resolver for the supplied key.\r\n * @param key The key to optionally resolve for.\r\n * @param [checkParent=true] Indicates whether or not the parent container\r\n * hierarchy should be checked.\r\n * @return Returns an instance of Optional for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n checkParent: boolean = true): Optional {\r\n return new Optional(key, checkParent);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject the dependency from the parent container instead of the current\r\n * one.\r\n */\r\n@resolver()\r\nexport class Parent = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'parent';\r\n\r\n /**\r\n * Creates an instance of the Parent class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to load the dependency from the parent container\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container): TImpl | null {\r\n return container.parent ? container.parent.get(this._key) : null;\r\n }\r\n\r\n /**\r\n * Creates a Parent Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Parent for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): Parent {\r\n return new Parent(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow injecting dependencies but also passing data to the constructor.\r\n */\r\n@resolver()\r\nexport class Factory = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtorOrFunctor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'factory';\r\n\r\n /**\r\n * Creates an instance of the Factory class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to pass the dependencies to the constructor.\r\n * @param container The container to invoke the constructor with dependencies\r\n * and other parameters.\r\n * @return Returns a function that can be invoked to resolve dependencies\r\n * later, and the rest of the parameters.\r\n */\r\n public get(container: Container): DependencyFunctor {\r\n let fn = this._key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === Strategy.function) {\r\n fn = resolver.state;\r\n }\r\n\r\n return (...rest) => container.invoke(fn as DependencyCtorOrFunctor, rest);\r\n }\r\n\r\n /**\r\n * Creates a Factory Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Factory for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: DependencyCtor\r\n ): Factory {\r\n return new Factory(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject a new instance of a dependency, without regard for existing\r\n * instances in the container. Instances can optionally be registered in the\r\n * container\r\n * under a different key by supplying a key using the `as` method.\r\n */\r\n@resolver()\r\nexport class NewInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public key: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public asKey: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public dynamicDependencies: TArgs[number][];\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'newInstance';\r\n\r\n /**\r\n * Creates an instance of the NewInstance class.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor, ...dynamicDependencies: TArgs[number][]) {\r\n this.key = key;\r\n this.asKey = key;\r\n this.dynamicDependencies = dynamicDependencies;\r\n }\r\n\r\n /**\r\n * Called by the container to instantiate the dependency and potentially\r\n * register\r\n * as another key if the `as` method was used.\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container) {\r\n const dynamicDependencies =\r\n this.dynamicDependencies.length > 0\r\n ? this.dynamicDependencies.map(dependency =>\r\n dependency['protocol:aurelia:resolver']\r\n ? dependency.get(container)\r\n : container.get(dependency)\r\n )\r\n : undefined;\r\n\r\n let fn = this.key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === 3) {\r\n fn = resolver.state;\r\n }\r\n\r\n const instance = container.invoke(fn as DependencyCtorOrFunctor, dynamicDependencies);\r\n container.registerInstance(this.asKey, instance);\r\n return instance;\r\n }\r\n\r\n /**\r\n * Instructs the NewInstance resolver to register the resolved instance using\r\n * the supplied key.\r\n * @param key The key to register the instance with.\r\n * @return Returns the NewInstance resolver.\r\n */\r\n public as(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this.asKey = key;\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates an NewInstance Resolver for the supplied key.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n * @return Returns an instance of NewInstance for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtorOrFunctor,\r\n ...dynamicDependencies: TArgs[number][]): NewInstance {\r\n return new NewInstance(key, ...dynamicDependencies);\r\n }\r\n}\r\n\r\n/**\r\n * Used by parameter decorators to call autoinject for the target and retrieve\r\n * the target's inject property.\r\n * @param target The target class.\r\n * @return Returns the target's own inject property.\r\n */\r\nexport function getDecoratorDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] }\r\n ) {\r\n autoinject(target);\r\n\r\n return target.inject;\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should be lazy loaded\r\n */\r\nexport function lazy<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: { new (...args: TArgs): TBase | TImpl },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Lazy.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should load all instances of the given\r\n * key.\r\n */\r\nexport function all<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = All.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as optional\r\n */\r\nexport function optional<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n checkParentOrTarget: boolean = true) {\r\n const deco = (checkParent: boolean) => {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Optional.of(inject[index], checkParent);\r\n };\r\n };\r\n if (typeof checkParentOrTarget === 'boolean') {\r\n return deco(checkParentOrTarget);\r\n }\r\n return deco(true);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to look at the parent container for\r\n * resolution\r\n */\r\nexport function parent<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Parent.of(inject[index]);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to create a factory method, that can\r\n * accept optional arguments\r\n */\r\nexport function factory<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Factory.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as a new instance. Instances can optionally be registered in the container\r\n * under a different key and/or use dynamic dependencies\r\n */\r\nexport function newInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n asKeyOrTarget?: PrimitiveOrDependencyCtor & { inject?: TArgs[number][] },\r\n ...dynamicDependencies: TArgs[number][]\r\n) {\r\n const deco = (asKey?: typeof asKeyOrTarget) => {\r\n return (\r\n target: { new (...args: any[]): any },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = NewInstance.of(inject[index], ...dynamicDependencies);\r\n if (!!asKey) {\r\n inject[index].as(asKey);\r\n }\r\n };\r\n };\r\n if (arguments.length >= 1) {\r\n return deco(asKeyOrTarget);\r\n }\r\n return deco();\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { AggregateError } from 'aurelia-pal';\r\nimport { resolver, StrategyResolver, Resolver, Strategy, StrategyState, Factory, NewInstance, Lazy, Optional, All, Parent } from './resolvers';\r\nimport { Invoker } from './invokers';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n DependencyCtor,\r\n PrimitiveOrDependencyCtor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args,\r\n Primitive\r\n} from './types';\r\n\r\nlet currentContainer: Container | null = null;\r\n\r\nfunction validateKey(key: any) {\r\n if (key === null || key === undefined) {\r\n throw new Error(\r\n 'key/value cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport const _emptyParameters = Object.freeze([]) as [];\r\n\r\nmetadata.registration = 'aurelia:registration';\r\nmetadata.invoker = 'aurelia:invoker';\r\n\r\nconst resolverDecorates = resolver.decorates!;\r\n\r\n/**\r\n * Stores the information needed to invoke a function.\r\n */\r\nexport class InvocationHandler<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args\r\n > {\r\n /**\r\n * The function to be invoked by this handler.\r\n */\r\n public fn: DependencyCtorOrFunctor;\r\n\r\n /**\r\n * The invoker implementation that will be used to actually invoke the function.\r\n */\r\n public invoker: Invoker;\r\n\r\n /**\r\n * The statically known dependencies of this function invocation.\r\n */\r\n public dependencies: TArgs;\r\n\r\n /**\r\n * Instantiates an InvocationDescription.\r\n * @param fn The Function described by this description object.\r\n * @param invoker The strategy for invoking the function.\r\n * @param dependencies The static dependencies of the function call.\r\n */\r\n constructor(\r\n fn: DependencyCtorOrFunctor,\r\n invoker: Invoker,\r\n dependencies: TArgs\r\n ) {\r\n this.fn = fn;\r\n this.invoker = invoker;\r\n this.dependencies = dependencies;\r\n }\r\n\r\n /**\r\n * Invokes the function.\r\n * @param container The calling container.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(container: Container, dynamicDependencies?: TArgs[]): TImpl {\r\n const previousContainer = currentContainer;\r\n currentContainer = container;\r\n try {\r\n return dynamicDependencies !== undefined\r\n ? this.invoker.invokeWithDynamicDependencies(\r\n container,\r\n this.fn,\r\n this.dependencies,\r\n dynamicDependencies\r\n )\r\n : this.invoker.invoke(container, this.fn, this.dependencies);\r\n } finally {\r\n currentContainer = previousContainer;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Used to configure a Container instance.\r\n */\r\nexport interface ContainerConfiguration {\r\n /**\r\n * An optional callback which will be called when any function needs an\r\n * InvocationHandler created (called once per Function).\r\n */\r\n onHandlerCreated?: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n handlers?: Map;\r\n}\r\n\r\nfunction invokeWithDynamicDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n) {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n let lookup;\r\n\r\n while (i--) {\r\n lookup = staticDependencies[i];\r\n\r\n if (lookup === null || lookup === undefined) {\r\n throw new Error(\r\n 'Constructor Parameter with index ' +\r\n i +\r\n ' cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n } else {\r\n args[i] = container.get(lookup);\r\n }\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return Reflect.construct(fn, args);\r\n}\r\n\r\nconst classInvoker: Invoker = {\r\n invoke(container, Type: DependencyCtor, deps) {\r\n const instances = deps.map((dep) => container.get(dep));\r\n return Reflect.construct(Type, instances);\r\n },\r\n invokeWithDynamicDependencies\r\n};\r\n\r\nfunction getDependencies(f) {\r\n if (!f.hasOwnProperty('inject')) {\r\n return [];\r\n }\r\n\r\n if (typeof f.inject === 'function') {\r\n return f.inject();\r\n }\r\n\r\n return f.inject;\r\n}\r\n\r\n/**\r\n * A lightweight, extensible dependency injection container.\r\n */\r\nexport class Container {\r\n /**\r\n * The global root Container instance. Available if makeGlobal() has been\r\n * called. Aurelia Framework calls makeGlobal().\r\n */\r\n public static instance: Container;\r\n\r\n /**\r\n * The parent container in the DI hierarchy.\r\n */\r\n public parent: Container | null;\r\n\r\n /**\r\n * The root container in the DI hierarchy.\r\n */\r\n public root: Container;\r\n\r\n /** @internal */\r\n public _configuration: ContainerConfiguration;\r\n\r\n /** @internal */\r\n public _onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n /** @internal */\r\n public _handlers: Map;\r\n\r\n /** @internal */\r\n public _resolvers: Map;\r\n\r\n /**\r\n * Creates an instance of Container.\r\n * @param configuration Provides some configuration for the new Container instance.\r\n */\r\n constructor(configuration?: ContainerConfiguration) {\r\n if (configuration === undefined) {\r\n configuration = {};\r\n }\r\n\r\n this._configuration = configuration;\r\n this._onHandlerCreated = configuration.onHandlerCreated!;\r\n this._handlers =\r\n configuration.handlers || (configuration.handlers = new Map());\r\n this._resolvers = new Map();\r\n this.root = this;\r\n this.parent = null;\r\n }\r\n\r\n /**\r\n * Makes this container instance globally reachable through Container.instance.\r\n */\r\n public makeGlobal(): Container {\r\n Container.instance = this;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets an invocation handler creation callback that will be called when new\r\n * InvocationsHandlers are created (called once per Function).\r\n * @param onHandlerCreated The callback to be called when an\r\n * InvocationsHandler is created.\r\n */\r\n public setHandlerCreatedCallback<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler\r\n ) {\r\n this._onHandlerCreated = onHandlerCreated;\r\n this._configuration.onHandlerCreated = onHandlerCreated;\r\n }\r\n\r\n /**\r\n * Registers an existing object instance with the container.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param instance The instance that will be resolved when the key is matched.\r\n * This defaults to the key value when instance is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerInstance = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n instance?: TImpl): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(0, instance === undefined ? key : instance)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container always\r\n * returns the same instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.singleton, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container returns a\r\n * new instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(2, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param handler The resolution function to use when the dependency is\r\n * needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerHandler = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n handler: (container?: Container, key?: PrimitiveOrDependencyCtor, resolver?: Resolver) => any\r\n ): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.function, handler)\r\n );\r\n }\r\n\r\n /**\r\n * Registers an additional key that serves as an alias to the original DI key.\r\n * @param originalKey The key that originally identified the dependency; usually a constructor function.\r\n * @param aliasKey An alternate key which can also be used to resolve the same dependency as the original.\r\n * @return The resolver that was registered.\r\n */\r\n public registerAlias = Impl, TArgs extends Args = Args>(\r\n originalKey: PrimitiveOrDependencyCtor,\r\n aliasKey: PrimitiveOrDependencyCtor): Resolver {\r\n return this.registerResolver(\r\n aliasKey,\r\n new StrategyResolver(5, originalKey)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param resolver The resolver to use when the dependency is needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n resolver: Resolver\r\n ): Resolver {\r\n validateKey(key);\r\n\r\n const allResolvers = this._resolvers;\r\n const result = allResolvers.get(key);\r\n\r\n if (result === undefined) {\r\n allResolvers.set(key, resolver);\r\n } else if (result.strategy === 4) {\r\n result.state.push(resolver);\r\n } else {\r\n allResolvers.set(key, new StrategyResolver(4, [result, resolver]));\r\n }\r\n\r\n return resolver;\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) by inspecting its registration\r\n * annotations. If none are found, then the default singleton registration is\r\n * used.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n */\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n fn = fn === undefined ? key as DependencyCtor : fn;\r\n\r\n if (typeof fn === 'function') {\r\n const registration = metadata.get(metadata.registration, fn);\r\n\r\n if (registration === undefined) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn));\r\n }\r\n\r\n return registration.registerResolver(this, key, fn);\r\n }\r\n\r\n return this.registerResolver(key, new StrategyResolver(0, fn));\r\n }\r\n\r\n /**\r\n * Registers an array of types (constructor functions) by inspecting their\r\n * registration annotations. If none are found, then the default singleton\r\n * registration is used.\r\n * @param fns The constructor function to use when the dependency needs to be instantiated.\r\n */\r\n public autoRegisterAll(fns: DependencyCtor[]): void {\r\n let i = fns.length;\r\n while (i--) {\r\n this.autoRegister(fns[i]);\r\n }\r\n }\r\n\r\n /**\r\n * Unregisters based on key.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n */\r\n public unregister(key: any): void {\r\n this._resolvers.delete(key);\r\n }\r\n\r\n /**\r\n * Inspects the container to determine if a particular key has been registred.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @param checkParent Indicates whether or not to check the parent container hierarchy.\r\n * @return Returns true if the key has been registred; false otherwise.\r\n */\r\n public hasResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, checkParent: boolean = false): boolean {\r\n validateKey(key);\r\n\r\n return (\r\n this._resolvers.has(key) ||\r\n (checkParent &&\r\n this.parent !== null &&\r\n this.parent.hasResolver(key, checkParent))\r\n );\r\n }\r\n\r\n /**\r\n * Gets the resolver for the particular key, if it has been registered.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @return Returns the resolver, if registred, otherwise undefined.\r\n */\r\n public getResolver<\r\n TStrategyKey extends keyof StrategyState,\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n >(\r\n key: PrimitiveOrDependencyCtorOrFunctor\r\n ): StrategyResolver {\r\n return this._resolvers.get(key);\r\n }\r\n\r\n /**\r\n * Resolves a single instance based on the provided key.\r\n * @param key The key that identifies the object to resolve.\r\n * @return Returns the resolved instance.\r\n */\r\n public get | Lazy | Factory | Optional | Parent | All>(\r\n key: TResolver): ResolvedValue;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: typeof Container): Container;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor | typeof Container): ImplOrAny | Container {\r\n validateKey(key);\r\n\r\n if (key === Container) {\r\n return this;\r\n }\r\n\r\n if (resolverDecorates(key)) {\r\n return key.get(this, key);\r\n }\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key as DependencyCtor).get(this, key);\r\n }\r\n\r\n const registration = metadata.get(metadata.registration, key);\r\n\r\n if (registration === undefined) {\r\n return this.parent._get(key);\r\n }\r\n\r\n return registration.registerResolver(\r\n this, key, key as DependencyCtorOrFunctor).get(this, key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n public _get(key) {\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n\r\n return this.parent._get(key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n /**\r\n * Resolves all instance registered under the provided key.\r\n * @param key The key that identifies the objects to resolve.\r\n * @return Returns an array of the resolved instances.\r\n */\r\n public getAll = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny[] {\r\n validateKey(key);\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return _emptyParameters;\r\n }\r\n\r\n return this.parent.getAll(key);\r\n }\r\n\r\n if (resolver.strategy === 4) {\r\n const state = resolver.state;\r\n let i = state.length;\r\n const results = new Array(i);\r\n\r\n while (i--) {\r\n results[i] = state[i].get(this, key);\r\n }\r\n\r\n return results;\r\n }\r\n\r\n return [resolver.get(this, key)];\r\n }\r\n\r\n /**\r\n * Creates a new dependency injection container whose parent is the current container.\r\n * @return Returns a new container instance parented to this.\r\n */\r\n public createChild(): Container {\r\n const child = new Container(this._configuration);\r\n child.root = this.root;\r\n child.parent = this;\r\n return child;\r\n }\r\n\r\n /**\r\n * Invokes a function, recursively resolving its dependencies.\r\n * @param fn The function to invoke with the auto-resolved dependencies.\r\n * @param dynamicDependencies Additional function dependencies to use during invocation.\r\n * @return Returns the instance resulting from calling the function.\r\n */\r\n public invoke = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor,\r\n dynamicDependencies?: TArgs[number][]\r\n ): ImplOrAny {\r\n try {\r\n let handler = this._handlers.get(fn);\r\n\r\n if (handler === undefined) {\r\n handler = this._createInvocationHandler(fn);\r\n this._handlers.set(fn, handler);\r\n }\r\n\r\n return handler.invoke(this, dynamicDependencies);\r\n } catch (e) {\r\n // @ts-expect-error AggregateError returns an Error in its type hence it fails (new ...) but it's fine\r\n throw new AggregateError(\r\n `Error invoking ${fn.name}. Check the inner error for details.`,\r\n e as Error | undefined,\r\n true\r\n );\r\n }\r\n }\r\n\r\n public _createInvocationHandler\r\n = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor & { inject?: any; }\r\n ): InvocationHandler {\r\n let dependencies;\r\n\r\n if (fn.inject === undefined) {\r\n dependencies =\r\n metadata.getOwn(metadata.paramTypes, fn) || _emptyParameters;\r\n } else {\r\n dependencies = [];\r\n let ctor = fn;\r\n while (typeof ctor === 'function') {\r\n dependencies.push(...getDependencies(ctor));\r\n ctor = Object.getPrototypeOf(ctor);\r\n }\r\n }\r\n\r\n const invoker = metadata.getOwn(metadata.invoker, fn) || classInvoker;\r\n\r\n const handler = new InvocationHandler(fn, invoker, dependencies);\r\n return this._onHandlerCreated !== undefined\r\n ? this._onHandlerCreated(handler)\r\n : handler;\r\n }\r\n}\r\n\r\nexport type ResolvedValue =\r\n T extends (new (...args: any[]) => infer R)\r\n ? R\r\n : T extends (abstract new (...args: any[]) => infer R)\r\n ? R\r\n : T extends Factory\r\n ? (...args: unknown[]) => R\r\n : T extends Lazy\r\n ? () => R\r\n : T extends NewInstance\r\n ? R\r\n : T extends Optional\r\n ? R | null\r\n : T extends All\r\n ? R[]\r\n : T extends Parent\r\n ? R | null\r\n : T extends [infer T1, ...infer T2]\r\n ? [ResolvedValue, ...ResolvedValue]\r\n : T;\r\n\r\n/**\r\n * Resolve a key, or list of keys based on the current container.\r\n * \r\n * @example\r\n * ```ts\r\n * import { resolve } from 'aurelia-framework';\r\n * // or\r\n * // import { Container, resolve } from 'aurelia-dependency-injection';\r\n * \r\n * class MyCustomElement {\r\n * someService = resolve(MyService);\r\n * }\r\n * ```\r\n */\r\nexport function resolve(key: K): ResolvedValue;\r\nexport function resolve(...keys: K): ResolvedValue\r\nexport function resolve(...keys: K) {\r\n if (currentContainer == null) {\r\n throw new Error(`There is not a currently active container to resolve \"${String(keys)}\". Are you trying to \"new SomeClass(...)\" that has a resolve(...) call?`);\r\n }\r\n \r\n return keys.length === 1\r\n ? currentContainer.get(keys[0])\r\n : keys.map(containerGetKey, currentContainer);\r\n}\r\n\r\nfunction containerGetKey(this: Container, key: any) {\r\n return this.get(key);\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { DependencyCtorOrFunctor, ImplOrAny, Impl, Args, DependencyCtor, DependencyFunctor } from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom Invoker for the decorated item.\r\n */\r\nexport function invoker, TArgs extends Args>(\r\n value: Invoker\r\n): (target: DependencyCtor) => void {\r\n return target => {\r\n metadata.define(metadata.invoker, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies that the decorated item should be called as a factory\r\n * function, rather than a constructor.\r\n */\r\nexport function invokeAsFactory, TArgs extends Args>(\r\n potentialTarget?: DependencyCtor\r\n): void | ((target: DependencyCtor) => void) {\r\n const deco = (target: DependencyCtor) => {\r\n metadata.define(metadata.invoker, FactoryInvoker.instance, target);\r\n };\r\n\r\n return potentialTarget ? deco(potentialTarget) : deco;\r\n}\r\n\r\n/**\r\n * A strategy for invoking a function, resulting in an object instance.\r\n */\r\nexport interface Invoker, TArgs extends Args> {\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during\r\n * invocation.\r\n * @return The result of the function invocation.\r\n */\r\n invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny;\r\n}\r\n\r\n/**\r\n * An Invoker that is used to invoke a factory method.\r\n */\r\nexport class FactoryInvoker<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > implements Invoker {\r\n /**\r\n * The singleton instance of the FactoryInvoker.\r\n */\r\n public static instance: FactoryInvoker;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny {\r\n let i = dependencies.length;\r\n const args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(dependencies[i]);\r\n }\r\n\r\n return ((fn as DependencyFunctor).apply(undefined, args as TArgs)) as ImplOrAny;\r\n }\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(staticDependencies[i]);\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return (fn as DependencyFunctor).apply(undefined, args as TArgs) as ImplOrAny;\r\n }\r\n}\r\n\r\nFactoryInvoker.instance = new FactoryInvoker();\r\n","import './internal';\r\nimport { Resolver } from './resolvers';\r\nimport { Container } from './container';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtor,\r\n Impl,\r\n Args,\r\n DependencyCtor\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom registration strategy for the decorated\r\n * class/function.\r\n */\r\nexport function registration, TArgs extends Args>(\r\n value: Registration) {\r\n return (target: DependencyCtor) => {\r\n metadata.define(metadata.registration, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"transient\"\r\n * lifetime.\r\n */\r\nexport function transient, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor) {\r\n return registration(new TransientRegistration(key));\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"singleton\"\r\n * lifetime.\r\n */\r\nexport function singleton(registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor, registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean, registerInChild: boolean = false) {\r\n return registration(\r\n new SingletonRegistration(keyOrRegisterInChild, registerInChild)\r\n );\r\n}\r\n\r\n/**\r\n * Customizes how a particular function is resolved by the Container.\r\n */\r\nexport interface Registration<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args> {\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver;\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * transients with the container.\r\n */\r\nexport class TransientRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of TransientRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(key?: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const existingResolver = container.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? container.registerTransient(\r\n (this._key || key) as string,\r\n fn as DependencyCtorOrFunctor)\r\n : existingResolver;\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * singletons with the container.\r\n */\r\nexport class SingletonRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _registerInChild: boolean;\r\n\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of SingletonRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean,\r\n registerInChild: boolean = false) {\r\n if (typeof keyOrRegisterInChild === 'boolean') {\r\n this._registerInChild = keyOrRegisterInChild;\r\n } else {\r\n this._key = keyOrRegisterInChild;\r\n this._registerInChild = registerInChild;\r\n }\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const targetContainer = this._registerInChild ? container : container.root;\r\n const existingResolver = targetContainer.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? targetContainer.registerSingleton(this._key || key, fn)\r\n : existing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eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC;YAC3E,QAAA,IAAM,gBAAgB,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC;oBACvE,OAAO,gBAAgB,KAAK,SAAS;YACnC,cAAE,eAAe,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,EAAE,EAAE,CAAC;0BACvD,gBAAgB,CAAC;iBACtB,CAAA;gBACH,OAAC,qBAAA,CAAA;YAAD,CAAC,EAAA;;;;;;;;","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/dist/umd-es2015/aurelia-dependency-injection.js.map b/dist/umd-es2015/aurelia-dependency-injection.js.map index eed05b5..f210fdb 100644 --- a/dist/umd-es2015/aurelia-dependency-injection.js.map +++ b/dist/umd-es2015/aurelia-dependency-injection.js.map @@ -1 +1 @@ -{"version":3,"file":"aurelia-dependency-injection.js","sources":["../../node_modules/tslib/tslib.es6.js","../../../src/injection.ts","../../../src/resolvers.ts","../../../src/container.ts","../../../src/invokers.ts","../../../src/registrations.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","import { metadata } from 'aurelia-metadata';\r\nimport { _emptyParameters } from './container';\r\nimport { Args, Impl, DependencyCtor } from './types';\r\n\r\n// tslint:disable-next-line:ban-types\r\nexport type Injectable = Function & { inject?: any[] | (() => any[]) };\r\n\r\nfunction isInjectable(potentialTarget: any): potentialTarget is Injectable {\r\n return !!potentialTarget;\r\n}\r\n\r\n/**\r\n * Decorator: Directs the TypeScript transpiler to write-out type metadata for\r\n * the decorated class.\r\n */\r\nexport function autoinject(\r\n potentialTarget?: TPotential\r\n): TPotential extends Injectable ? void : (target: Injectable) => void {\r\n const deco = (target: Injectable): void => {\r\n if (!target.hasOwnProperty('inject')) {\r\n target.inject = (\r\n (metadata.getOwn(metadata.paramTypes, target) as any[]) ||\r\n _emptyParameters\r\n ).slice();\r\n if (target.inject && target.inject.length > 0) {\r\n // TypeScript 3.0 metadata for \"...rest\" gives type \"Object\"\r\n // if last parameter is \"Object\", assume it's a ...rest and remove that\r\n // metadata.\r\n if (target.inject[target.inject.length - 1] === Object) {\r\n target.inject.splice(-1, 1);\r\n }\r\n }\r\n }\r\n };\r\n if (isInjectable(potentialTarget)) {\r\n return deco(potentialTarget) as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n }\r\n return deco as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n}\r\n/**\r\n * Decorator: Specifies the dependencies that should be injected by the DI Container into the decorated class/function.\r\n */\r\nexport function inject<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(...rest: TArgs[number][]): any {\r\n return (\r\n target: DependencyCtor & { inject: any },\r\n _key: any,\r\n descriptor: any) => {\r\n // handle when used as a constructor parameter decorator\r\n if (typeof descriptor === 'number') {\r\n autoinject(target);\r\n if (rest.length === 1) {\r\n target.inject[descriptor] = rest[0];\r\n }\r\n return;\r\n }\r\n // if it's true then we injecting rest into function and not Class constructor\r\n if (descriptor) {\r\n const fn = descriptor.value;\r\n fn.inject = rest;\r\n } else {\r\n target.inject = rest;\r\n }\r\n };\r\n}\r\n","import { protocol } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { autoinject } from './injection';\r\nimport type {\r\n PrimitiveOrDependencyCtor,\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n DependencyCtor,\r\n DependencyFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Indicates that the decorated class/object is a custom resolver.\r\n */\r\nexport const resolver: {\r\n decorates?: (key: any) => key is { get(container: Container, key: any): any };\r\n} & (() => any) = ((protocol as unknown) as { create(...args: any[]): any }).create(\r\n 'aurelia:resolver',\r\n (target): string | boolean => {\r\n if (!(typeof target.get === 'function')) {\r\n return 'Resolvers must implement: get(container: Container, key: any): any';\r\n }\r\n\r\n return true;\r\n }\r\n);\r\n\r\n/**\r\n * Used to allow functions/classes to specify custom dependency resolution logic.\r\n */\r\nexport interface Resolver {\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n get(container: Container, key: any): any;\r\n}\r\n\r\nexport enum Strategy {\r\n instance = 0,\r\n singleton = 1,\r\n transient = 2,\r\n function = 3,\r\n array = 4,\r\n alias = 5\r\n}\r\nexport type IStrategy = 1 | 2 | 3 | 4 | 5;\r\n\r\nexport type StrategyFunctor<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > = (\r\n container?: Container,\r\n ctor?: PrimitiveOrDependencyCtorOrFunctor,\r\n strategyResolver?: any\r\n ) => TImpl;\r\n\r\nexport interface StrategyState<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > {\r\n [Strategy.instance]: TImpl;\r\n [Strategy.singleton]: DependencyCtorOrFunctor;\r\n [Strategy.transient]: DependencyCtorOrFunctor;\r\n [Strategy.function]: StrategyFunctor;\r\n /**\r\n * For typings purposes, this is done as ({ get: StrategyFunctor } | TImpl)[]\r\n * But it should be understood, and used as [{ get: StrategyFunctor }, ...TImp[]]\r\n */\r\n [Strategy.array]: ({\r\n get: (\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor\r\n ) => TImpl\r\n } | TImpl)[];\r\n [Strategy.alias]: any;\r\n}\r\n\r\nfunction isStrategy<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TKey extends keyof StrategyState\r\n>(\r\n actual: Strategy,\r\n expected: TKey,\r\n state):\r\n state is StrategyState[TKey] {\r\n return actual === expected;\r\n}\r\n/**\r\n * Used to resolve instances, singletons, transients, aliases\r\n */\r\n@resolver()\r\nexport class StrategyResolver<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TStrategyKey extends keyof StrategyState> {\r\n\r\n public strategy: keyof StrategyState;\r\n public state: StrategyState[keyof StrategyState];\r\n\r\n /**\r\n * Creates an instance of the StrategyResolver class.\r\n * @param strategy The type of resolution strategy.\r\n * @param state The state associated with the resolution strategy.\r\n */\r\n constructor(strategy: TStrategyKey, state: StrategyState[TStrategyKey]) {\r\n this.strategy = strategy;\r\n this.state = state;\r\n }\r\n\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n public get(container: Container, key: PrimitiveOrDependencyCtor) {\r\n if (isStrategy(this.strategy, Strategy.instance, this.state)) {\r\n return this.state;\r\n }\r\n if (isStrategy(this.strategy, Strategy.singleton, this.state)) {\r\n const singleton = container.invoke(this.state);\r\n this.state = singleton;\r\n this.strategy = 0;\r\n return singleton;\r\n }\r\n if (isStrategy(this.strategy, Strategy.transient, this.state)) {\r\n return container.invoke(this.state);\r\n }\r\n if (isStrategy(this.strategy, Strategy.function, this.state)) {\r\n return this.state(container, key, this);\r\n }\r\n if (isStrategy(this.strategy, Strategy.array, this.state)) {\r\n return (this.state[0] as { get: StrategyFunctor }).get(container, key);\r\n }\r\n if (isStrategy(this.strategy, Strategy.alias, this.state)) {\r\n return container.get(this.state) as TImpl;\r\n }\r\n throw new Error('Invalid strategy: ' + this.strategy);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify lazy resolution logic.\r\n */\r\n@resolver()\r\nexport class Lazy = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'lazy';\r\n\r\n /**\r\n * Creates an instance of the Lazy class.\r\n * @param key The key to lazily resolve.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to lazily resolve the dependency into a lazy locator\r\n * function.\r\n * @param container The container to resolve from.\r\n * @return Returns a function which can be invoked at a later time to obtain\r\n * the actual dependency.\r\n */\r\n public get(container: Container): () => ImplOrAny {\r\n return () => container.get(this._key);\r\n }\r\n\r\n /**\r\n * Creates a Lazy Resolver for the supplied key.\r\n * @param key The key to lazily resolve.\r\n * @return Returns an instance of Lazy for the key.\r\n */\r\n public static of<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ) {\r\n return new Lazy(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify resolution of all matches to a key.\r\n */\r\n@resolver()\r\nexport class All = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'all';\r\n\r\n /**\r\n * Creates an instance of the All class.\r\n * @param key The key to lazily resolve all matches for.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to resolve all matching dependencies as an array of\r\n * instances.\r\n * @param container The container to resolve from.\r\n * @return Returns an array of all matching instances.\r\n */\r\n public get(container: Container): TImpl[] {\r\n return container.getAll(this._key);\r\n }\r\n\r\n /**\r\n * Creates an All Resolver for the supplied key.\r\n * @param key The key to resolve all instances for.\r\n * @return Returns an instance of All for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): All {\r\n return new All(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify an optional dependency, which will\r\n * be resolved only if already registred with the container.\r\n */\r\n@resolver()\r\nexport class Optional = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /** @internal */\r\n public _checkParent: boolean;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'optional';\r\n\r\n /**\r\n * Creates an instance of the Optional class.\r\n * @param key The key to optionally resolve for.\r\n * @param checkParent Indicates whether or not the parent container hierarchy\r\n * should be checked.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor, checkParent: boolean = true) {\r\n this._key = key;\r\n this._checkParent = checkParent;\r\n }\r\n\r\n /**\r\n * Called by the container to provide optional resolution of the key.\r\n * @param container The container to resolve from.\r\n * @return Returns the instance if found; otherwise null.\r\n */\r\n public get(container: Container): TImpl | null {\r\n if (container.hasResolver(this._key, this._checkParent)) {\r\n return container.get(this._key);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Creates an Optional Resolver for the supplied key.\r\n * @param key The key to optionally resolve for.\r\n * @param [checkParent=true] Indicates whether or not the parent container\r\n * hierarchy should be checked.\r\n * @return Returns an instance of Optional for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n checkParent: boolean = true): Optional {\r\n return new Optional(key, checkParent);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject the dependency from the parent container instead of the current\r\n * one.\r\n */\r\n@resolver()\r\nexport class Parent = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'parent';\r\n\r\n /**\r\n * Creates an instance of the Parent class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to load the dependency from the parent container\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container): TImpl | null {\r\n return container.parent ? container.parent.get(this._key) : null;\r\n }\r\n\r\n /**\r\n * Creates a Parent Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Parent for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): Parent {\r\n return new Parent(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow injecting dependencies but also passing data to the constructor.\r\n */\r\n@resolver()\r\nexport class Factory = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtorOrFunctor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'factory';\r\n\r\n /**\r\n * Creates an instance of the Factory class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to pass the dependencies to the constructor.\r\n * @param container The container to invoke the constructor with dependencies\r\n * and other parameters.\r\n * @return Returns a function that can be invoked to resolve dependencies\r\n * later, and the rest of the parameters.\r\n */\r\n public get(container: Container): DependencyFunctor {\r\n let fn = this._key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === Strategy.function) {\r\n fn = resolver.state;\r\n }\r\n\r\n return (...rest) => container.invoke(fn as DependencyCtorOrFunctor, rest);\r\n }\r\n\r\n /**\r\n * Creates a Factory Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Factory for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: DependencyCtor\r\n ): Factory {\r\n return new Factory(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject a new instance of a dependency, without regard for existing\r\n * instances in the container. Instances can optionally be registered in the\r\n * container\r\n * under a different key by supplying a key using the `as` method.\r\n */\r\n@resolver()\r\nexport class NewInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public key: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public asKey: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public dynamicDependencies: TArgs[number][];\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'newInstance';\r\n\r\n /**\r\n * Creates an instance of the NewInstance class.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor, ...dynamicDependencies: TArgs[number][]) {\r\n this.key = key;\r\n this.asKey = key;\r\n this.dynamicDependencies = dynamicDependencies;\r\n }\r\n\r\n /**\r\n * Called by the container to instantiate the dependency and potentially\r\n * register\r\n * as another key if the `as` method was used.\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container) {\r\n const dynamicDependencies =\r\n this.dynamicDependencies.length > 0\r\n ? this.dynamicDependencies.map(dependency =>\r\n dependency['protocol:aurelia:resolver']\r\n ? dependency.get(container)\r\n : container.get(dependency)\r\n )\r\n : undefined;\r\n\r\n let fn = this.key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === 3) {\r\n fn = resolver.state;\r\n }\r\n\r\n const instance = container.invoke(fn as DependencyCtorOrFunctor, dynamicDependencies);\r\n container.registerInstance(this.asKey, instance);\r\n return instance;\r\n }\r\n\r\n /**\r\n * Instructs the NewInstance resolver to register the resolved instance using\r\n * the supplied key.\r\n * @param key The key to register the instance with.\r\n * @return Returns the NewInstance resolver.\r\n */\r\n public as(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this.asKey = key;\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates an NewInstance Resolver for the supplied key.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n * @return Returns an instance of NewInstance for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtorOrFunctor,\r\n ...dynamicDependencies: TArgs[number][]): NewInstance {\r\n return new NewInstance(key, ...dynamicDependencies);\r\n }\r\n}\r\n\r\n/**\r\n * Used by parameter decorators to call autoinject for the target and retrieve\r\n * the target's inject property.\r\n * @param target The target class.\r\n * @return Returns the target's own inject property.\r\n */\r\nexport function getDecoratorDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] }\r\n ) {\r\n autoinject(target);\r\n\r\n return target.inject;\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should be lazy loaded\r\n */\r\nexport function lazy<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: { new (...args: TArgs): TBase | TImpl },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Lazy.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should load all instances of the given\r\n * key.\r\n */\r\nexport function all<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = All.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as optional\r\n */\r\nexport function optional<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n checkParentOrTarget: boolean = true) {\r\n const deco = (checkParent: boolean) => {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Optional.of(inject[index], checkParent);\r\n };\r\n };\r\n if (typeof checkParentOrTarget === 'boolean') {\r\n return deco(checkParentOrTarget);\r\n }\r\n return deco(true);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to look at the parent container for\r\n * resolution\r\n */\r\nexport function parent<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Parent.of(inject[index]);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to create a factory method, that can\r\n * accept optional arguments\r\n */\r\nexport function factory<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Factory.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as a new instance. Instances can optionally be registered in the container\r\n * under a different key and/or use dynamic dependencies\r\n */\r\nexport function newInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n asKeyOrTarget?: PrimitiveOrDependencyCtor & { inject?: TArgs[number][] },\r\n ...dynamicDependencies: TArgs[number][]\r\n) {\r\n const deco = (asKey?: typeof asKeyOrTarget) => {\r\n return (\r\n target: { new (...args: any[]): any },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = NewInstance.of(inject[index], ...dynamicDependencies);\r\n if (!!asKey) {\r\n inject[index].as(asKey);\r\n }\r\n };\r\n };\r\n if (arguments.length >= 1) {\r\n return deco(asKeyOrTarget);\r\n }\r\n return deco();\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { AggregateError } from 'aurelia-pal';\r\nimport { resolver, StrategyResolver, Resolver, Strategy, StrategyState, Factory, NewInstance, Lazy, Optional, All, Parent } from './resolvers';\r\nimport { Invoker } from './invokers';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n DependencyCtor,\r\n PrimitiveOrDependencyCtor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args,\r\n Primitive\r\n} from './types';\r\n\r\nlet currentContainer: Container | null = null;\r\n\r\nfunction validateKey(key: any) {\r\n if (key === null || key === undefined) {\r\n throw new Error(\r\n 'key/value cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport const _emptyParameters = Object.freeze([]) as [];\r\n\r\nmetadata.registration = 'aurelia:registration';\r\nmetadata.invoker = 'aurelia:invoker';\r\n\r\nconst resolverDecorates = resolver.decorates!;\r\n\r\n/**\r\n * Stores the information needed to invoke a function.\r\n */\r\nexport class InvocationHandler<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args\r\n > {\r\n /**\r\n * The function to be invoked by this handler.\r\n */\r\n public fn: DependencyCtorOrFunctor;\r\n\r\n /**\r\n * The invoker implementation that will be used to actually invoke the function.\r\n */\r\n public invoker: Invoker;\r\n\r\n /**\r\n * The statically known dependencies of this function invocation.\r\n */\r\n public dependencies: TArgs;\r\n\r\n /**\r\n * Instantiates an InvocationDescription.\r\n * @param fn The Function described by this description object.\r\n * @param invoker The strategy for invoking the function.\r\n * @param dependencies The static dependencies of the function call.\r\n */\r\n constructor(\r\n fn: DependencyCtorOrFunctor,\r\n invoker: Invoker,\r\n dependencies: TArgs\r\n ) {\r\n this.fn = fn;\r\n this.invoker = invoker;\r\n this.dependencies = dependencies;\r\n }\r\n\r\n /**\r\n * Invokes the function.\r\n * @param container The calling container.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(container: Container, dynamicDependencies?: TArgs[]): TImpl {\r\n const previousContainer = currentContainer;\r\n currentContainer = container;\r\n try {\r\n return dynamicDependencies !== undefined\r\n ? this.invoker.invokeWithDynamicDependencies(\r\n container,\r\n this.fn,\r\n this.dependencies,\r\n dynamicDependencies\r\n )\r\n : this.invoker.invoke(container, this.fn, this.dependencies);\r\n } finally {\r\n currentContainer = previousContainer;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Used to configure a Container instance.\r\n */\r\nexport interface ContainerConfiguration {\r\n /**\r\n * An optional callback which will be called when any function needs an\r\n * InvocationHandler created (called once per Function).\r\n */\r\n onHandlerCreated?: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n handlers?: Map;\r\n}\r\n\r\nfunction invokeWithDynamicDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n) {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n let lookup;\r\n\r\n while (i--) {\r\n lookup = staticDependencies[i];\r\n\r\n if (lookup === null || lookup === undefined) {\r\n throw new Error(\r\n 'Constructor Parameter with index ' +\r\n i +\r\n ' cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n } else {\r\n args[i] = container.get(lookup);\r\n }\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return Reflect.construct(fn, args);\r\n}\r\n\r\nconst classInvoker: Invoker = {\r\n invoke(container, Type: DependencyCtor, deps) {\r\n const instances = deps.map((dep) => container.get(dep));\r\n return Reflect.construct(Type, instances);\r\n },\r\n invokeWithDynamicDependencies\r\n};\r\n\r\nfunction getDependencies(f) {\r\n if (!f.hasOwnProperty('inject')) {\r\n return [];\r\n }\r\n\r\n if (typeof f.inject === 'function') {\r\n return f.inject();\r\n }\r\n\r\n return f.inject;\r\n}\r\n\r\n/**\r\n * A lightweight, extensible dependency injection container.\r\n */\r\nexport class Container {\r\n /**\r\n * The global root Container instance. Available if makeGlobal() has been\r\n * called. Aurelia Framework calls makeGlobal().\r\n */\r\n public static instance: Container;\r\n\r\n /**\r\n * The parent container in the DI hierarchy.\r\n */\r\n public parent: Container | null;\r\n\r\n /**\r\n * The root container in the DI hierarchy.\r\n */\r\n public root: Container;\r\n\r\n /** @internal */\r\n public _configuration: ContainerConfiguration;\r\n\r\n /** @internal */\r\n public _onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n /** @internal */\r\n public _handlers: Map;\r\n\r\n /** @internal */\r\n public _resolvers: Map;\r\n\r\n /**\r\n * Creates an instance of Container.\r\n * @param configuration Provides some configuration for the new Container instance.\r\n */\r\n constructor(configuration?: ContainerConfiguration) {\r\n if (configuration === undefined) {\r\n configuration = {};\r\n }\r\n\r\n this._configuration = configuration;\r\n this._onHandlerCreated = configuration.onHandlerCreated!;\r\n this._handlers =\r\n configuration.handlers || (configuration.handlers = new Map());\r\n this._resolvers = new Map();\r\n this.root = this;\r\n this.parent = null;\r\n }\r\n\r\n /**\r\n * Makes this container instance globally reachable through Container.instance.\r\n */\r\n public makeGlobal(): Container {\r\n Container.instance = this;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets an invocation handler creation callback that will be called when new\r\n * InvocationsHandlers are created (called once per Function).\r\n * @param onHandlerCreated The callback to be called when an\r\n * InvocationsHandler is created.\r\n */\r\n public setHandlerCreatedCallback<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler\r\n ) {\r\n this._onHandlerCreated = onHandlerCreated;\r\n this._configuration.onHandlerCreated = onHandlerCreated;\r\n }\r\n\r\n /**\r\n * Registers an existing object instance with the container.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param instance The instance that will be resolved when the key is matched.\r\n * This defaults to the key value when instance is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerInstance = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n instance?: TImpl): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(0, instance === undefined ? key : instance)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container always\r\n * returns the same instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.singleton, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container returns a\r\n * new instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(2, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param handler The resolution function to use when the dependency is\r\n * needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerHandler = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n handler: (container?: Container, key?: PrimitiveOrDependencyCtor, resolver?: Resolver) => any\r\n ): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.function, handler)\r\n );\r\n }\r\n\r\n /**\r\n * Registers an additional key that serves as an alias to the original DI key.\r\n * @param originalKey The key that originally identified the dependency; usually a constructor function.\r\n * @param aliasKey An alternate key which can also be used to resolve the same dependency as the original.\r\n * @return The resolver that was registered.\r\n */\r\n public registerAlias = Impl, TArgs extends Args = Args>(\r\n originalKey: PrimitiveOrDependencyCtor,\r\n aliasKey: PrimitiveOrDependencyCtor): Resolver {\r\n return this.registerResolver(\r\n aliasKey,\r\n new StrategyResolver(5, originalKey)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param resolver The resolver to use when the dependency is needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n resolver: Resolver\r\n ): Resolver {\r\n validateKey(key);\r\n\r\n const allResolvers = this._resolvers;\r\n const result = allResolvers.get(key);\r\n\r\n if (result === undefined) {\r\n allResolvers.set(key, resolver);\r\n } else if (result.strategy === 4) {\r\n result.state.push(resolver);\r\n } else {\r\n allResolvers.set(key, new StrategyResolver(4, [result, resolver]));\r\n }\r\n\r\n return resolver;\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) by inspecting its registration\r\n * annotations. If none are found, then the default singleton registration is\r\n * used.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n */\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n fn = fn === undefined ? key as DependencyCtor : fn;\r\n\r\n if (typeof fn === 'function') {\r\n const registration = metadata.get(metadata.registration, fn);\r\n\r\n if (registration === undefined) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn));\r\n }\r\n\r\n return registration.registerResolver(this, key, fn);\r\n }\r\n\r\n return this.registerResolver(key, new StrategyResolver(0, fn));\r\n }\r\n\r\n /**\r\n * Registers an array of types (constructor functions) by inspecting their\r\n * registration annotations. If none are found, then the default singleton\r\n * registration is used.\r\n * @param fns The constructor function to use when the dependency needs to be instantiated.\r\n */\r\n public autoRegisterAll(fns: DependencyCtor[]): void {\r\n let i = fns.length;\r\n while (i--) {\r\n this.autoRegister(fns[i]);\r\n }\r\n }\r\n\r\n /**\r\n * Unregisters based on key.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n */\r\n public unregister(key: any): void {\r\n this._resolvers.delete(key);\r\n }\r\n\r\n /**\r\n * Inspects the container to determine if a particular key has been registred.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @param checkParent Indicates whether or not to check the parent container hierarchy.\r\n * @return Returns true if the key has been registred; false otherwise.\r\n */\r\n public hasResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, checkParent: boolean = false): boolean {\r\n validateKey(key);\r\n\r\n return (\r\n this._resolvers.has(key) ||\r\n (checkParent &&\r\n this.parent !== null &&\r\n this.parent.hasResolver(key, checkParent))\r\n );\r\n }\r\n\r\n /**\r\n * Gets the resolver for the particular key, if it has been registered.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @return Returns the resolver, if registred, otherwise undefined.\r\n */\r\n public getResolver<\r\n TStrategyKey extends keyof StrategyState,\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n >(\r\n key: PrimitiveOrDependencyCtorOrFunctor\r\n ): StrategyResolver {\r\n return this._resolvers.get(key);\r\n }\r\n\r\n /**\r\n * Resolves a single instance based on the provided key.\r\n * @param key The key that identifies the object to resolve.\r\n * @return Returns the resolved instance.\r\n */\r\n public get | Lazy | Factory | Optional | Parent | All>(\r\n key: TResolver): ResolvedValue;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: typeof Container): Container;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor | typeof Container): ImplOrAny | Container {\r\n validateKey(key);\r\n\r\n if (key === Container) {\r\n return this;\r\n }\r\n\r\n if (resolverDecorates(key)) {\r\n return key.get(this, key);\r\n }\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key as DependencyCtor).get(this, key);\r\n }\r\n\r\n const registration = metadata.get(metadata.registration, key);\r\n\r\n if (registration === undefined) {\r\n return this.parent._get(key);\r\n }\r\n\r\n return registration.registerResolver(\r\n this, key, key as DependencyCtorOrFunctor).get(this, key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n public _get(key) {\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n\r\n return this.parent._get(key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n /**\r\n * Resolves all instance registered under the provided key.\r\n * @param key The key that identifies the objects to resolve.\r\n * @return Returns an array of the resolved instances.\r\n */\r\n public getAll = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny[] {\r\n validateKey(key);\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return _emptyParameters;\r\n }\r\n\r\n return this.parent.getAll(key);\r\n }\r\n\r\n if (resolver.strategy === 4) {\r\n const state = resolver.state;\r\n let i = state.length;\r\n const results = new Array(i);\r\n\r\n while (i--) {\r\n results[i] = state[i].get(this, key);\r\n }\r\n\r\n return results;\r\n }\r\n\r\n return [resolver.get(this, key)];\r\n }\r\n\r\n /**\r\n * Creates a new dependency injection container whose parent is the current container.\r\n * @return Returns a new container instance parented to this.\r\n */\r\n public createChild(): Container {\r\n const child = new Container(this._configuration);\r\n child.root = this.root;\r\n child.parent = this;\r\n return child;\r\n }\r\n\r\n /**\r\n * Invokes a function, recursively resolving its dependencies.\r\n * @param fn The function to invoke with the auto-resolved dependencies.\r\n * @param dynamicDependencies Additional function dependencies to use during invocation.\r\n * @return Returns the instance resulting from calling the function.\r\n */\r\n public invoke = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor,\r\n dynamicDependencies?: TArgs[number][]\r\n ): ImplOrAny {\r\n try {\r\n let handler = this._handlers.get(fn);\r\n\r\n if (handler === undefined) {\r\n handler = this._createInvocationHandler(fn);\r\n this._handlers.set(fn, handler);\r\n }\r\n\r\n return handler.invoke(this, dynamicDependencies);\r\n } catch (e) {\r\n // @ts-expect-error AggregateError returns an Error in its type hence it fails (new ...) but it's fine\r\n throw new AggregateError(\r\n `Error invoking ${fn.name}. Check the inner error for details.`,\r\n e as Error | undefined,\r\n true\r\n );\r\n }\r\n }\r\n\r\n public _createInvocationHandler\r\n = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor & { inject?: any; }\r\n ): InvocationHandler {\r\n let dependencies;\r\n\r\n if (fn.inject === undefined) {\r\n dependencies =\r\n metadata.getOwn(metadata.paramTypes, fn) || _emptyParameters;\r\n } else {\r\n dependencies = [];\r\n let ctor = fn;\r\n while (typeof ctor === 'function') {\r\n dependencies.push(...getDependencies(ctor));\r\n ctor = Object.getPrototypeOf(ctor);\r\n }\r\n }\r\n\r\n const invoker = metadata.getOwn(metadata.invoker, fn) || classInvoker;\r\n\r\n const handler = new InvocationHandler(fn, invoker, dependencies);\r\n return this._onHandlerCreated !== undefined\r\n ? this._onHandlerCreated(handler)\r\n : handler;\r\n }\r\n}\r\n\r\nexport type ResolvedValue =\r\n T extends { new (...args: any[]): infer R }\r\n ? R\r\n : T extends Factory\r\n ? (...args: unknown[]) => R\r\n : T extends Lazy\r\n ? () => R\r\n : T extends NewInstance\r\n ? R\r\n : T extends Optional\r\n ? R | null\r\n : T extends All\r\n ? R[]\r\n : T extends Parent\r\n ? R | null\r\n : T extends [infer T1, ...infer T2]\r\n ? [ResolvedValue, ...ResolvedValue]\r\n : T;\r\n\r\n/**\r\n * Resolve a key, or list of keys based on the current container.\r\n * \r\n * @example\r\n * ```ts\r\n * import { resolve } from 'aurelia-framework';\r\n * // or\r\n * // import { Container, resolve } from 'aurelia-dependency-injection';\r\n * \r\n * class MyCustomElement {\r\n * someService = resolve(MyService);\r\n * }\r\n * ```\r\n */\r\nexport function resolve(key: K): ResolvedValue;\r\nexport function resolve(...keys: K): ResolvedValue\r\nexport function resolve(...keys: K) {\r\n if (currentContainer == null) {\r\n throw new Error(`There is not a currently active container to resolve \"${String(keys)}\". Are you trying to \"new SomeClass(...)\" that has a resolve(...) call?`);\r\n }\r\n \r\n return keys.length === 1\r\n ? currentContainer.get(keys[0])\r\n : keys.map(containerGetKey, currentContainer);\r\n}\r\n\r\nfunction containerGetKey(this: Container, key: any) {\r\n return this.get(key);\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { DependencyCtorOrFunctor, ImplOrAny, Impl, Args, DependencyCtor, DependencyFunctor } from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom Invoker for the decorated item.\r\n */\r\nexport function invoker, TArgs extends Args>(\r\n value: Invoker\r\n): (target: DependencyCtor) => void {\r\n return target => {\r\n metadata.define(metadata.invoker, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies that the decorated item should be called as a factory\r\n * function, rather than a constructor.\r\n */\r\nexport function invokeAsFactory, TArgs extends Args>(\r\n potentialTarget?: DependencyCtor\r\n): void | ((target: DependencyCtor) => void) {\r\n const deco = (target: DependencyCtor) => {\r\n metadata.define(metadata.invoker, FactoryInvoker.instance, target);\r\n };\r\n\r\n return potentialTarget ? deco(potentialTarget) : deco;\r\n}\r\n\r\n/**\r\n * A strategy for invoking a function, resulting in an object instance.\r\n */\r\nexport interface Invoker, TArgs extends Args> {\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during\r\n * invocation.\r\n * @return The result of the function invocation.\r\n */\r\n invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny;\r\n}\r\n\r\n/**\r\n * An Invoker that is used to invoke a factory method.\r\n */\r\nexport class FactoryInvoker<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > implements Invoker {\r\n /**\r\n * The singleton instance of the FactoryInvoker.\r\n */\r\n public static instance: FactoryInvoker;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny {\r\n let i = dependencies.length;\r\n const args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(dependencies[i]);\r\n }\r\n\r\n return ((fn as DependencyFunctor).apply(undefined, args as TArgs)) as ImplOrAny;\r\n }\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(staticDependencies[i]);\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return (fn as DependencyFunctor).apply(undefined, args as TArgs) as ImplOrAny;\r\n }\r\n}\r\n\r\nFactoryInvoker.instance = new FactoryInvoker();\r\n","import './internal';\r\nimport { Resolver } from './resolvers';\r\nimport { Container } from './container';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtor,\r\n Impl,\r\n Args,\r\n DependencyCtor\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom registration strategy for the decorated\r\n * class/function.\r\n */\r\nexport function registration, TArgs extends Args>(\r\n value: Registration) {\r\n return (target: DependencyCtor) => {\r\n metadata.define(metadata.registration, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"transient\"\r\n * lifetime.\r\n */\r\nexport function transient, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor) {\r\n return registration(new TransientRegistration(key));\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"singleton\"\r\n * lifetime.\r\n */\r\nexport function singleton(registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor, registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean, registerInChild: boolean = false) {\r\n return registration(\r\n new SingletonRegistration(keyOrRegisterInChild, registerInChild)\r\n );\r\n}\r\n\r\n/**\r\n * Customizes how a particular function is resolved by the Container.\r\n */\r\nexport interface Registration<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args> {\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver;\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * transients with the container.\r\n */\r\nexport class TransientRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of TransientRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(key?: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const existingResolver = container.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? container.registerTransient(\r\n (this._key || key) as string,\r\n fn as DependencyCtorOrFunctor)\r\n : existingResolver;\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * singletons with the container.\r\n */\r\nexport class SingletonRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _registerInChild: boolean;\r\n\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of SingletonRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean,\r\n registerInChild: boolean = false) {\r\n if (typeof keyOrRegisterInChild === 'boolean') {\r\n this._registerInChild = keyOrRegisterInChild;\r\n } else {\r\n this._key = keyOrRegisterInChild;\r\n this._registerInChild = registerInChild;\r\n }\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const targetContainer = this._registerInChild ? container : container.root;\r\n const existingResolver = targetContainer.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? targetContainer.registerSingleton(this._key || key, fn)\r\n : existingResolver;\r\n }\r\n}\r\n"],"names":["metadata","protocol","Strategy","StrategyResolver","Lazy","All","Optional","Parent","Factory","NewInstance","AggregateError"],"mappings":";;;;;;IAAA;IACA;AACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;I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B,GAAmD,EACnD,EAAgD,EAAA;IAEhD,QAAA,MAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC;IAC3E,QAAA,MAAM,gBAAgB,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC;YACvE,OAAO,gBAAgB,KAAK,SAAS;IACnC,cAAE,eAAe,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,EAAE,EAAE,CAAC;kBACvD,gBAAgB,CAAC;SACtB;IACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]} \ No newline at end of file +{"version":3,"file":"aurelia-dependency-injection.js","sources":["../../node_modules/tslib/tslib.es6.js","../../../src/injection.ts","../../../src/resolvers.ts","../../../src/container.ts","../../../src/invokers.ts","../../../src/registrations.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","import { metadata } from 'aurelia-metadata';\r\nimport { _emptyParameters } from './container';\r\nimport { Args, Impl, DependencyCtor } from './types';\r\n\r\n// tslint:disable-next-line:ban-types\r\nexport type Injectable = Function & { inject?: any[] | (() => any[]) };\r\n\r\nfunction isInjectable(potentialTarget: any): potentialTarget is Injectable {\r\n return !!potentialTarget;\r\n}\r\n\r\n/**\r\n * Decorator: Directs the TypeScript transpiler to write-out type metadata for\r\n * the decorated class.\r\n */\r\nexport function autoinject(\r\n potentialTarget?: TPotential\r\n): TPotential extends Injectable ? void : (target: Injectable) => void {\r\n const deco = (target: Injectable): void => {\r\n if (!target.hasOwnProperty('inject')) {\r\n target.inject = (\r\n (metadata.getOwn(metadata.paramTypes, target) as any[]) ||\r\n _emptyParameters\r\n ).slice();\r\n if (target.inject && target.inject.length > 0) {\r\n // TypeScript 3.0 metadata for \"...rest\" gives type \"Object\"\r\n // if last parameter is \"Object\", assume it's a ...rest and remove that\r\n // metadata.\r\n if (target.inject[target.inject.length - 1] === Object) {\r\n target.inject.splice(-1, 1);\r\n }\r\n }\r\n }\r\n };\r\n if (isInjectable(potentialTarget)) {\r\n return deco(potentialTarget) as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n }\r\n return deco as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n}\r\n/**\r\n * Decorator: Specifies the dependencies that should be injected by the DI Container into the decorated class/function.\r\n */\r\nexport function inject<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(...rest: TArgs[number][]): any {\r\n return (\r\n target: DependencyCtor & { inject: any },\r\n _key: any,\r\n descriptor: any) => {\r\n // handle when used as a constructor parameter decorator\r\n if (typeof descriptor === 'number') {\r\n autoinject(target);\r\n if (rest.length === 1) {\r\n target.inject[descriptor] = rest[0];\r\n }\r\n return;\r\n }\r\n // if it's true then we injecting rest into function and not Class constructor\r\n if (descriptor) {\r\n const fn = descriptor.value;\r\n fn.inject = rest;\r\n } else {\r\n target.inject = rest;\r\n }\r\n };\r\n}\r\n","import { protocol } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { autoinject } from './injection';\r\nimport type {\r\n PrimitiveOrDependencyCtor,\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n DependencyCtor,\r\n DependencyFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Indicates that the decorated class/object is a custom resolver.\r\n */\r\nexport const resolver: {\r\n decorates?: (key: any) => key is { get(container: Container, key: any): any };\r\n} & (() => any) = ((protocol as unknown) as { create(...args: any[]): any }).create(\r\n 'aurelia:resolver',\r\n (target): string | boolean => {\r\n if (!(typeof target.get === 'function')) {\r\n return 'Resolvers must implement: get(container: Container, key: any): any';\r\n }\r\n\r\n return true;\r\n }\r\n);\r\n\r\n/**\r\n * Used to allow functions/classes to specify custom dependency resolution logic.\r\n */\r\nexport interface Resolver {\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n get(container: Container, key: any): any;\r\n}\r\n\r\nexport enum Strategy {\r\n instance = 0,\r\n singleton = 1,\r\n transient = 2,\r\n function = 3,\r\n array = 4,\r\n alias = 5\r\n}\r\nexport type IStrategy = 1 | 2 | 3 | 4 | 5;\r\n\r\nexport type StrategyFunctor<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > = (\r\n container?: Container,\r\n ctor?: PrimitiveOrDependencyCtorOrFunctor,\r\n strategyResolver?: any\r\n ) => TImpl;\r\n\r\nexport interface StrategyState<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > {\r\n [Strategy.instance]: TImpl;\r\n [Strategy.singleton]: DependencyCtorOrFunctor;\r\n [Strategy.transient]: DependencyCtorOrFunctor;\r\n [Strategy.function]: StrategyFunctor;\r\n /**\r\n * For typings purposes, this is done as ({ get: StrategyFunctor } | TImpl)[]\r\n * But it should be understood, and used as [{ get: StrategyFunctor }, ...TImp[]]\r\n */\r\n [Strategy.array]: ({\r\n get: (\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor\r\n ) => TImpl\r\n } | TImpl)[];\r\n [Strategy.alias]: any;\r\n}\r\n\r\nfunction isStrategy<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TKey extends keyof StrategyState\r\n>(\r\n actual: Strategy,\r\n expected: TKey,\r\n state):\r\n state is StrategyState[TKey] {\r\n return actual === expected;\r\n}\r\n/**\r\n * Used to resolve instances, singletons, transients, aliases\r\n */\r\n@resolver()\r\nexport class StrategyResolver<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TStrategyKey extends keyof StrategyState> {\r\n\r\n public strategy: keyof StrategyState;\r\n public state: StrategyState[keyof StrategyState];\r\n\r\n /**\r\n * Creates an instance of the StrategyResolver class.\r\n * @param strategy The type of resolution strategy.\r\n * @param state The state associated with the resolution strategy.\r\n */\r\n constructor(strategy: TStrategyKey, state: StrategyState[TStrategyKey]) {\r\n this.strategy = strategy;\r\n this.state = state;\r\n }\r\n\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n public get(container: Container, key: PrimitiveOrDependencyCtor) {\r\n if (isStrategy(this.strategy, Strategy.instance, this.state)) {\r\n return this.state;\r\n }\r\n if (isStrategy(this.strategy, Strategy.singleton, this.state)) {\r\n const singleton = container.invoke(this.state);\r\n this.state = singleton;\r\n this.strategy = 0;\r\n return singleton;\r\n }\r\n if (isStrategy(this.strategy, Strategy.transient, this.state)) {\r\n return container.invoke(this.state);\r\n }\r\n if (isStrategy(this.strategy, Strategy.function, this.state)) {\r\n return this.state(container, key, this);\r\n }\r\n if (isStrategy(this.strategy, Strategy.array, this.state)) {\r\n return (this.state[0] as { get: StrategyFunctor }).get(container, key);\r\n }\r\n if (isStrategy(this.strategy, Strategy.alias, this.state)) {\r\n return container.get(this.state) as TImpl;\r\n }\r\n throw new Error('Invalid strategy: ' + this.strategy);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify lazy resolution logic.\r\n */\r\n@resolver()\r\nexport class Lazy = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'lazy';\r\n\r\n /**\r\n * Creates an instance of the Lazy class.\r\n * @param key The key to lazily resolve.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to lazily resolve the dependency into a lazy locator\r\n * function.\r\n * @param container The container to resolve from.\r\n * @return Returns a function which can be invoked at a later time to obtain\r\n * the actual dependency.\r\n */\r\n public get(container: Container): () => ImplOrAny {\r\n return () => container.get(this._key);\r\n }\r\n\r\n /**\r\n * Creates a Lazy Resolver for the supplied key.\r\n * @param key The key to lazily resolve.\r\n * @return Returns an instance of Lazy for the key.\r\n */\r\n public static of<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ) {\r\n return new Lazy(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify resolution of all matches to a key.\r\n */\r\n@resolver()\r\nexport class All = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'all';\r\n\r\n /**\r\n * Creates an instance of the All class.\r\n * @param key The key to lazily resolve all matches for.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to resolve all matching dependencies as an array of\r\n * instances.\r\n * @param container The container to resolve from.\r\n * @return Returns an array of all matching instances.\r\n */\r\n public get(container: Container): TImpl[] {\r\n return container.getAll(this._key);\r\n }\r\n\r\n /**\r\n * Creates an All Resolver for the supplied key.\r\n * @param key The key to resolve all instances for.\r\n * @return Returns an instance of All for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): All {\r\n return new All(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify an optional dependency, which will\r\n * be resolved only if already registred with the container.\r\n */\r\n@resolver()\r\nexport class Optional = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /** @internal */\r\n public _checkParent: boolean;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'optional';\r\n\r\n /**\r\n * Creates an instance of the Optional class.\r\n * @param key The key to optionally resolve for.\r\n * @param checkParent Indicates whether or not the parent container hierarchy\r\n * should be checked.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor, checkParent: boolean = true) {\r\n this._key = key;\r\n this._checkParent = checkParent;\r\n }\r\n\r\n /**\r\n * Called by the container to provide optional resolution of the key.\r\n * @param container The container to resolve from.\r\n * @return Returns the instance if found; otherwise null.\r\n */\r\n public get(container: Container): TImpl | null {\r\n if (container.hasResolver(this._key, this._checkParent)) {\r\n return container.get(this._key);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Creates an Optional Resolver for the supplied key.\r\n * @param key The key to optionally resolve for.\r\n * @param [checkParent=true] Indicates whether or not the parent container\r\n * hierarchy should be checked.\r\n * @return Returns an instance of Optional for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n checkParent: boolean = true): Optional {\r\n return new Optional(key, checkParent);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject the dependency from the parent container instead of the current\r\n * one.\r\n */\r\n@resolver()\r\nexport class Parent = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'parent';\r\n\r\n /**\r\n * Creates an instance of the Parent class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to load the dependency from the parent container\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container): TImpl | null {\r\n return container.parent ? container.parent.get(this._key) : null;\r\n }\r\n\r\n /**\r\n * Creates a Parent Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Parent for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): Parent {\r\n return new Parent(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow injecting dependencies but also passing data to the constructor.\r\n */\r\n@resolver()\r\nexport class Factory = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtorOrFunctor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'factory';\r\n\r\n /**\r\n * Creates an instance of the Factory class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to pass the dependencies to the constructor.\r\n * @param container The container to invoke the constructor with dependencies\r\n * and other parameters.\r\n * @return Returns a function that can be invoked to resolve dependencies\r\n * later, and the rest of the parameters.\r\n */\r\n public get(container: Container): DependencyFunctor {\r\n let fn = this._key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === Strategy.function) {\r\n fn = resolver.state;\r\n }\r\n\r\n return (...rest) => container.invoke(fn as DependencyCtorOrFunctor, rest);\r\n }\r\n\r\n /**\r\n * Creates a Factory Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Factory for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: DependencyCtor\r\n ): Factory {\r\n return new Factory(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject a new instance of a dependency, without regard for existing\r\n * instances in the container. Instances can optionally be registered in the\r\n * container\r\n * under a different key by supplying a key using the `as` method.\r\n */\r\n@resolver()\r\nexport class NewInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public key: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public asKey: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public dynamicDependencies: TArgs[number][];\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'newInstance';\r\n\r\n /**\r\n * Creates an instance of the NewInstance class.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor, ...dynamicDependencies: TArgs[number][]) {\r\n this.key = key;\r\n this.asKey = key;\r\n this.dynamicDependencies = dynamicDependencies;\r\n }\r\n\r\n /**\r\n * Called by the container to instantiate the dependency and potentially\r\n * register\r\n * as another key if the `as` method was used.\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container) {\r\n const dynamicDependencies =\r\n this.dynamicDependencies.length > 0\r\n ? this.dynamicDependencies.map(dependency =>\r\n dependency['protocol:aurelia:resolver']\r\n ? dependency.get(container)\r\n : container.get(dependency)\r\n )\r\n : undefined;\r\n\r\n let fn = this.key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === 3) {\r\n fn = resolver.state;\r\n }\r\n\r\n const instance = container.invoke(fn as DependencyCtorOrFunctor, dynamicDependencies);\r\n container.registerInstance(this.asKey, instance);\r\n return instance;\r\n }\r\n\r\n /**\r\n * Instructs the NewInstance resolver to register the resolved instance using\r\n * the supplied key.\r\n * @param key The key to register the instance with.\r\n * @return Returns the NewInstance resolver.\r\n */\r\n public as(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this.asKey = key;\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates an NewInstance Resolver for the supplied key.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n * @return Returns an instance of NewInstance for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtorOrFunctor,\r\n ...dynamicDependencies: TArgs[number][]): NewInstance {\r\n return new NewInstance(key, ...dynamicDependencies);\r\n }\r\n}\r\n\r\n/**\r\n * Used by parameter decorators to call autoinject for the target and retrieve\r\n * the target's inject property.\r\n * @param target The target class.\r\n * @return Returns the target's own inject property.\r\n */\r\nexport function getDecoratorDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] }\r\n ) {\r\n autoinject(target);\r\n\r\n return target.inject;\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should be lazy loaded\r\n */\r\nexport function lazy<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: { new (...args: TArgs): TBase | TImpl },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Lazy.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should load all instances of the given\r\n * key.\r\n */\r\nexport function all<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = All.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as optional\r\n */\r\nexport function optional<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n checkParentOrTarget: boolean = true) {\r\n const deco = (checkParent: boolean) => {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Optional.of(inject[index], checkParent);\r\n };\r\n };\r\n if (typeof checkParentOrTarget === 'boolean') {\r\n return deco(checkParentOrTarget);\r\n }\r\n return deco(true);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to look at the parent container for\r\n * resolution\r\n */\r\nexport function parent<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Parent.of(inject[index]);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to create a factory method, that can\r\n * accept optional arguments\r\n */\r\nexport function factory<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Factory.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as a new instance. Instances can optionally be registered in the container\r\n * under a different key and/or use dynamic dependencies\r\n */\r\nexport function newInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n asKeyOrTarget?: PrimitiveOrDependencyCtor & { inject?: TArgs[number][] },\r\n ...dynamicDependencies: TArgs[number][]\r\n) {\r\n const deco = (asKey?: typeof asKeyOrTarget) => {\r\n return (\r\n target: { new (...args: any[]): any },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = NewInstance.of(inject[index], ...dynamicDependencies);\r\n if (!!asKey) {\r\n inject[index].as(asKey);\r\n }\r\n };\r\n };\r\n if (arguments.length >= 1) {\r\n return deco(asKeyOrTarget);\r\n }\r\n return deco();\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { AggregateError } from 'aurelia-pal';\r\nimport { resolver, StrategyResolver, Resolver, Strategy, StrategyState, Factory, NewInstance, Lazy, Optional, All, Parent } from './resolvers';\r\nimport { Invoker } from './invokers';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n DependencyCtor,\r\n PrimitiveOrDependencyCtor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args,\r\n Primitive\r\n} from './types';\r\n\r\nlet currentContainer: Container | null = null;\r\n\r\nfunction validateKey(key: any) {\r\n if (key === null || key === undefined) {\r\n throw new Error(\r\n 'key/value cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport const _emptyParameters = Object.freeze([]) as [];\r\n\r\nmetadata.registration = 'aurelia:registration';\r\nmetadata.invoker = 'aurelia:invoker';\r\n\r\nconst resolverDecorates = resolver.decorates!;\r\n\r\n/**\r\n * Stores the information needed to invoke a function.\r\n */\r\nexport class InvocationHandler<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args\r\n > {\r\n /**\r\n * The function to be invoked by this handler.\r\n */\r\n public fn: DependencyCtorOrFunctor;\r\n\r\n /**\r\n * The invoker implementation that will be used to actually invoke the function.\r\n */\r\n public invoker: Invoker;\r\n\r\n /**\r\n * The statically known dependencies of this function invocation.\r\n */\r\n public dependencies: TArgs;\r\n\r\n /**\r\n * Instantiates an InvocationDescription.\r\n * @param fn The Function described by this description object.\r\n * @param invoker The strategy for invoking the function.\r\n * @param dependencies The static dependencies of the function call.\r\n */\r\n constructor(\r\n fn: DependencyCtorOrFunctor,\r\n invoker: Invoker,\r\n dependencies: TArgs\r\n ) {\r\n this.fn = fn;\r\n this.invoker = invoker;\r\n this.dependencies = dependencies;\r\n }\r\n\r\n /**\r\n * Invokes the function.\r\n * @param container The calling container.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(container: Container, dynamicDependencies?: TArgs[]): TImpl {\r\n const previousContainer = currentContainer;\r\n currentContainer = container;\r\n try {\r\n return dynamicDependencies !== undefined\r\n ? this.invoker.invokeWithDynamicDependencies(\r\n container,\r\n this.fn,\r\n this.dependencies,\r\n dynamicDependencies\r\n )\r\n : this.invoker.invoke(container, this.fn, this.dependencies);\r\n } finally {\r\n currentContainer = previousContainer;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Used to configure a Container instance.\r\n */\r\nexport interface ContainerConfiguration {\r\n /**\r\n * An optional callback which will be called when any function needs an\r\n * InvocationHandler created (called once per Function).\r\n */\r\n onHandlerCreated?: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n handlers?: Map;\r\n}\r\n\r\nfunction invokeWithDynamicDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n) {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n let lookup;\r\n\r\n while (i--) {\r\n lookup = staticDependencies[i];\r\n\r\n if (lookup === null || lookup === undefined) {\r\n throw new Error(\r\n 'Constructor Parameter with index ' +\r\n i +\r\n ' cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n } else {\r\n args[i] = container.get(lookup);\r\n }\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return Reflect.construct(fn, args);\r\n}\r\n\r\nconst classInvoker: Invoker = {\r\n invoke(container, Type: DependencyCtor, deps) {\r\n const instances = deps.map((dep) => container.get(dep));\r\n return Reflect.construct(Type, instances);\r\n },\r\n invokeWithDynamicDependencies\r\n};\r\n\r\nfunction getDependencies(f) {\r\n if (!f.hasOwnProperty('inject')) {\r\n return [];\r\n }\r\n\r\n if (typeof f.inject === 'function') {\r\n return f.inject();\r\n }\r\n\r\n return f.inject;\r\n}\r\n\r\n/**\r\n * A lightweight, extensible dependency injection container.\r\n */\r\nexport class Container {\r\n /**\r\n * The global root Container instance. Available if makeGlobal() has been\r\n * called. Aurelia Framework calls makeGlobal().\r\n */\r\n public static instance: Container;\r\n\r\n /**\r\n * The parent container in the DI hierarchy.\r\n */\r\n public parent: Container | null;\r\n\r\n /**\r\n * The root container in the DI hierarchy.\r\n */\r\n public root: Container;\r\n\r\n /** @internal */\r\n public _configuration: ContainerConfiguration;\r\n\r\n /** @internal */\r\n public _onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n /** @internal */\r\n public _handlers: Map;\r\n\r\n /** @internal */\r\n public _resolvers: Map;\r\n\r\n /**\r\n * Creates an instance of Container.\r\n * @param configuration Provides some configuration for the new Container instance.\r\n */\r\n constructor(configuration?: ContainerConfiguration) {\r\n if (configuration === undefined) {\r\n configuration = {};\r\n }\r\n\r\n this._configuration = configuration;\r\n this._onHandlerCreated = configuration.onHandlerCreated!;\r\n this._handlers =\r\n configuration.handlers || (configuration.handlers = new Map());\r\n this._resolvers = new Map();\r\n this.root = this;\r\n this.parent = null;\r\n }\r\n\r\n /**\r\n * Makes this container instance globally reachable through Container.instance.\r\n */\r\n public makeGlobal(): Container {\r\n Container.instance = this;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets an invocation handler creation callback that will be called when new\r\n * InvocationsHandlers are created (called once per Function).\r\n * @param onHandlerCreated The callback to be called when an\r\n * InvocationsHandler is created.\r\n */\r\n public setHandlerCreatedCallback<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler\r\n ) {\r\n this._onHandlerCreated = onHandlerCreated;\r\n this._configuration.onHandlerCreated = onHandlerCreated;\r\n }\r\n\r\n /**\r\n * Registers an existing object instance with the container.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param instance The instance that will be resolved when the key is matched.\r\n * This defaults to the key value when instance is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerInstance = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n instance?: TImpl): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(0, instance === undefined ? key : instance)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container always\r\n * returns the same instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.singleton, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container returns a\r\n * new instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(2, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param handler The resolution function to use when the dependency is\r\n * needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerHandler = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n handler: (container?: Container, key?: PrimitiveOrDependencyCtor, resolver?: Resolver) => any\r\n ): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.function, handler)\r\n );\r\n }\r\n\r\n /**\r\n * Registers an additional key that serves as an alias to the original DI key.\r\n * @param originalKey The key that originally identified the dependency; usually a constructor function.\r\n * @param aliasKey An alternate key which can also be used to resolve the same dependency as the original.\r\n * @return The resolver that was registered.\r\n */\r\n public registerAlias = Impl, TArgs extends Args = Args>(\r\n originalKey: PrimitiveOrDependencyCtor,\r\n aliasKey: PrimitiveOrDependencyCtor): Resolver {\r\n return this.registerResolver(\r\n aliasKey,\r\n new StrategyResolver(5, originalKey)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param resolver The resolver to use when the dependency is needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n resolver: Resolver\r\n ): Resolver {\r\n validateKey(key);\r\n\r\n const allResolvers = this._resolvers;\r\n const result = allResolvers.get(key);\r\n\r\n if (result === undefined) {\r\n allResolvers.set(key, resolver);\r\n } else if (result.strategy === 4) {\r\n result.state.push(resolver);\r\n } else {\r\n allResolvers.set(key, new StrategyResolver(4, [result, resolver]));\r\n }\r\n\r\n return resolver;\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) by inspecting its registration\r\n * annotations. If none are found, then the default singleton registration is\r\n * used.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n */\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n fn = fn === undefined ? key as DependencyCtor : fn;\r\n\r\n if (typeof fn === 'function') {\r\n const registration = metadata.get(metadata.registration, fn);\r\n\r\n if (registration === undefined) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn));\r\n }\r\n\r\n return registration.registerResolver(this, key, fn);\r\n }\r\n\r\n return this.registerResolver(key, new StrategyResolver(0, fn));\r\n }\r\n\r\n /**\r\n * Registers an array of types (constructor functions) by inspecting their\r\n * registration annotations. If none are found, then the default singleton\r\n * registration is used.\r\n * @param fns The constructor function to use when the dependency needs to be instantiated.\r\n */\r\n public autoRegisterAll(fns: DependencyCtor[]): void {\r\n let i = fns.length;\r\n while (i--) {\r\n this.autoRegister(fns[i]);\r\n }\r\n }\r\n\r\n /**\r\n * Unregisters based on key.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n */\r\n public unregister(key: any): void {\r\n this._resolvers.delete(key);\r\n }\r\n\r\n /**\r\n * Inspects the container to determine if a particular key has been registred.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @param checkParent Indicates whether or not to check the parent container hierarchy.\r\n * @return Returns true if the key has been registred; false otherwise.\r\n */\r\n public hasResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, checkParent: boolean = false): boolean {\r\n validateKey(key);\r\n\r\n return (\r\n this._resolvers.has(key) ||\r\n (checkParent &&\r\n this.parent !== null &&\r\n this.parent.hasResolver(key, checkParent))\r\n );\r\n }\r\n\r\n /**\r\n * Gets the resolver for the particular key, if it has been registered.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @return Returns the resolver, if registred, otherwise undefined.\r\n */\r\n public getResolver<\r\n TStrategyKey extends keyof StrategyState,\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n >(\r\n key: PrimitiveOrDependencyCtorOrFunctor\r\n ): StrategyResolver {\r\n return this._resolvers.get(key);\r\n }\r\n\r\n /**\r\n * Resolves a single instance based on the provided key.\r\n * @param key The key that identifies the object to resolve.\r\n * @return Returns the resolved instance.\r\n */\r\n public get | Lazy | Factory | Optional | Parent | All>(\r\n key: TResolver): ResolvedValue;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: typeof Container): Container;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor | typeof Container): ImplOrAny | Container {\r\n validateKey(key);\r\n\r\n if (key === Container) {\r\n return this;\r\n }\r\n\r\n if (resolverDecorates(key)) {\r\n return key.get(this, key);\r\n }\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key as DependencyCtor).get(this, key);\r\n }\r\n\r\n const registration = metadata.get(metadata.registration, key);\r\n\r\n if (registration === undefined) {\r\n return this.parent._get(key);\r\n }\r\n\r\n return registration.registerResolver(\r\n this, key, key as DependencyCtorOrFunctor).get(this, key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n public _get(key) {\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n\r\n return this.parent._get(key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n /**\r\n * Resolves all instance registered under the provided key.\r\n * @param key The key that identifies the objects to resolve.\r\n * @return Returns an array of the resolved instances.\r\n */\r\n public getAll = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny[] {\r\n validateKey(key);\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return _emptyParameters;\r\n }\r\n\r\n return this.parent.getAll(key);\r\n }\r\n\r\n if (resolver.strategy === 4) {\r\n const state = resolver.state;\r\n let i = state.length;\r\n const results = new Array(i);\r\n\r\n while (i--) {\r\n results[i] = state[i].get(this, key);\r\n }\r\n\r\n return results;\r\n }\r\n\r\n return [resolver.get(this, key)];\r\n }\r\n\r\n /**\r\n * Creates a new dependency injection container whose parent is the current container.\r\n * @return Returns a new container instance parented to this.\r\n */\r\n public createChild(): Container {\r\n const child = new Container(this._configuration);\r\n child.root = this.root;\r\n child.parent = this;\r\n return child;\r\n }\r\n\r\n /**\r\n * Invokes a function, recursively resolving its dependencies.\r\n * @param fn The function to invoke with the auto-resolved dependencies.\r\n * @param dynamicDependencies Additional function dependencies to use during invocation.\r\n * @return Returns the instance resulting from calling the function.\r\n */\r\n public invoke = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor,\r\n dynamicDependencies?: TArgs[number][]\r\n ): ImplOrAny {\r\n try {\r\n let handler = this._handlers.get(fn);\r\n\r\n if (handler === undefined) {\r\n handler = this._createInvocationHandler(fn);\r\n this._handlers.set(fn, handler);\r\n }\r\n\r\n return handler.invoke(this, dynamicDependencies);\r\n } catch (e) {\r\n // @ts-expect-error AggregateError returns an Error in its type hence it fails (new ...) but it's fine\r\n throw new AggregateError(\r\n `Error invoking ${fn.name}. Check the inner error for details.`,\r\n e as Error | undefined,\r\n true\r\n );\r\n }\r\n }\r\n\r\n public _createInvocationHandler\r\n = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor & { inject?: any; }\r\n ): InvocationHandler {\r\n let dependencies;\r\n\r\n if (fn.inject === undefined) {\r\n dependencies =\r\n metadata.getOwn(metadata.paramTypes, fn) || _emptyParameters;\r\n } else {\r\n dependencies = [];\r\n let ctor = fn;\r\n while (typeof ctor === 'function') {\r\n dependencies.push(...getDependencies(ctor));\r\n ctor = Object.getPrototypeOf(ctor);\r\n }\r\n }\r\n\r\n const invoker = metadata.getOwn(metadata.invoker, fn) || classInvoker;\r\n\r\n const handler = new InvocationHandler(fn, invoker, dependencies);\r\n return this._onHandlerCreated !== undefined\r\n ? this._onHandlerCreated(handler)\r\n : handler;\r\n }\r\n}\r\n\r\nexport type ResolvedValue =\r\n T extends (new (...args: any[]) => infer R)\r\n ? R\r\n : T extends (abstract new (...args: any[]) => infer R)\r\n ? R\r\n : T extends Factory\r\n ? (...args: unknown[]) => R\r\n : T extends Lazy\r\n ? () => R\r\n : T extends NewInstance\r\n ? R\r\n : T extends Optional\r\n ? R | null\r\n : T extends All\r\n ? R[]\r\n : T extends Parent\r\n ? R | null\r\n : T extends [infer T1, ...infer T2]\r\n ? [ResolvedValue, ...ResolvedValue]\r\n : T;\r\n\r\n/**\r\n * Resolve a key, or list of keys based on the current container.\r\n * \r\n * @example\r\n * ```ts\r\n * import { resolve } from 'aurelia-framework';\r\n * // or\r\n * // import { Container, resolve } from 'aurelia-dependency-injection';\r\n * \r\n * class MyCustomElement {\r\n * someService = resolve(MyService);\r\n * }\r\n * ```\r\n */\r\nexport function resolve(key: K): ResolvedValue;\r\nexport function resolve(...keys: K): ResolvedValue\r\nexport function resolve(...keys: K) {\r\n if (currentContainer == null) {\r\n throw new Error(`There is not a currently active container to resolve \"${String(keys)}\". Are you trying to \"new SomeClass(...)\" that has a resolve(...) call?`);\r\n }\r\n \r\n return keys.length === 1\r\n ? currentContainer.get(keys[0])\r\n : keys.map(containerGetKey, currentContainer);\r\n}\r\n\r\nfunction containerGetKey(this: Container, key: any) {\r\n return this.get(key);\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { DependencyCtorOrFunctor, ImplOrAny, Impl, Args, DependencyCtor, DependencyFunctor } from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom Invoker for the decorated item.\r\n */\r\nexport function invoker, TArgs extends Args>(\r\n value: Invoker\r\n): (target: DependencyCtor) => void {\r\n return target => {\r\n metadata.define(metadata.invoker, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies that the decorated item should be called as a factory\r\n * function, rather than a constructor.\r\n */\r\nexport function invokeAsFactory, TArgs extends Args>(\r\n potentialTarget?: DependencyCtor\r\n): void | ((target: DependencyCtor) => void) {\r\n const deco = (target: DependencyCtor) => {\r\n metadata.define(metadata.invoker, FactoryInvoker.instance, target);\r\n };\r\n\r\n return potentialTarget ? deco(potentialTarget) : deco;\r\n}\r\n\r\n/**\r\n * A strategy for invoking a function, resulting in an object instance.\r\n */\r\nexport interface Invoker, TArgs extends Args> {\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during\r\n * invocation.\r\n * @return The result of the function invocation.\r\n */\r\n invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny;\r\n}\r\n\r\n/**\r\n * An Invoker that is used to invoke a factory method.\r\n */\r\nexport class FactoryInvoker<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > implements Invoker {\r\n /**\r\n * The singleton instance of the FactoryInvoker.\r\n */\r\n public static instance: FactoryInvoker;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny {\r\n let i = dependencies.length;\r\n const args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(dependencies[i]);\r\n }\r\n\r\n return ((fn as DependencyFunctor).apply(undefined, args as TArgs)) as ImplOrAny;\r\n }\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(staticDependencies[i]);\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return (fn as DependencyFunctor).apply(undefined, args as TArgs) as ImplOrAny;\r\n }\r\n}\r\n\r\nFactoryInvoker.instance = new FactoryInvoker();\r\n","import './internal';\r\nimport { Resolver } from './resolvers';\r\nimport { Container } from './container';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtor,\r\n Impl,\r\n Args,\r\n DependencyCtor\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom registration strategy for the decorated\r\n * class/function.\r\n */\r\nexport function registration, TArgs extends Args>(\r\n value: Registration) {\r\n return (target: DependencyCtor) => {\r\n metadata.define(metadata.registration, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"transient\"\r\n * lifetime.\r\n */\r\nexport function transient, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor) {\r\n return registration(new TransientRegistration(key));\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"singleton\"\r\n * lifetime.\r\n */\r\nexport function singleton(registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor, registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean, registerInChild: boolean = false) {\r\n return registration(\r\n new SingletonRegistration(keyOrRegisterInChild, registerInChild)\r\n );\r\n}\r\n\r\n/**\r\n * Customizes how a particular function is resolved by the Container.\r\n */\r\nexport interface Registration<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args> {\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver;\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * transients with the container.\r\n */\r\nexport class TransientRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of TransientRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(key?: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const existingResolver = container.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? container.registerTransient(\r\n (this._key || key) as string,\r\n fn as DependencyCtorOrFunctor)\r\n : existingResolver;\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * singletons with the container.\r\n */\r\nexport class SingletonRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _registerInChild: boolean;\r\n\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of SingletonRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean,\r\n registerInChild: boolean = false) {\r\n if (typeof keyOrRegisterInChild === 'boolean') {\r\n this._registerInChild = keyOrRegisterInChild;\r\n } else {\r\n this._key = keyOrRegisterInChild;\r\n this._registerInChild = registerInChild;\r\n }\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const targetContainer = this._registerInChild ? container : container.root;\r\n const existingResolver = targetContainer.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? targetContainer.registerSingleton(this._key || key, fn)\r\n : existingResolver;\r\n }\r\n}\r\n"],"names":["metadata","protocol","Strategy","StrategyResolver","Lazy","All","Optional","Parent","Factory","NewInstance","AggregateError"],"mappings":";;;;;;IAAA;IACA;AACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AACA;AAsCA;IACO,SAAS,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;I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AC,IAAI,CAAC;IAC3E,QAAA,MAAM,gBAAgB,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC;YACvE,OAAO,gBAAgB,KAAK,SAAS;IACnC,cAAE,eAAe,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,EAAE,EAAE,CAAC;kBACvD,gBAAgB,CAAC;SACtB;IACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/dist/umd/aurelia-dependency-injection.js.map b/dist/umd/aurelia-dependency-injection.js.map index eb4daec..15c3b13 100644 --- a/dist/umd/aurelia-dependency-injection.js.map +++ b/dist/umd/aurelia-dependency-injection.js.map @@ -1 +1 @@ -{"version":3,"file":"aurelia-dependency-injection.js","sources":["../../node_modules/tslib/tslib.es6.js","../../../src/injection.ts","../../../src/resolvers.ts","../../../src/container.ts","../../../src/invokers.ts","../../../src/registrations.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","import { metadata } from 'aurelia-metadata';\r\nimport { _emptyParameters } from './container';\r\nimport { Args, Impl, DependencyCtor } from './types';\r\n\r\n// tslint:disable-next-line:ban-types\r\nexport type Injectable = Function & { inject?: any[] | (() => any[]) };\r\n\r\nfunction isInjectable(potentialTarget: any): potentialTarget is Injectable {\r\n return !!potentialTarget;\r\n}\r\n\r\n/**\r\n * Decorator: Directs the TypeScript transpiler to write-out type metadata for\r\n * the decorated class.\r\n */\r\nexport function autoinject(\r\n potentialTarget?: TPotential\r\n): TPotential extends Injectable ? void : (target: Injectable) => void {\r\n const deco = (target: Injectable): void => {\r\n if (!target.hasOwnProperty('inject')) {\r\n target.inject = (\r\n (metadata.getOwn(metadata.paramTypes, target) as any[]) ||\r\n _emptyParameters\r\n ).slice();\r\n if (target.inject && target.inject.length > 0) {\r\n // TypeScript 3.0 metadata for \"...rest\" gives type \"Object\"\r\n // if last parameter is \"Object\", assume it's a ...rest and remove that\r\n // metadata.\r\n if (target.inject[target.inject.length - 1] === Object) {\r\n target.inject.splice(-1, 1);\r\n }\r\n }\r\n }\r\n };\r\n if (isInjectable(potentialTarget)) {\r\n return deco(potentialTarget) as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n }\r\n return deco as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n}\r\n/**\r\n * Decorator: Specifies the dependencies that should be injected by the DI Container into the decorated class/function.\r\n */\r\nexport function inject<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(...rest: TArgs[number][]): any {\r\n return (\r\n target: DependencyCtor & { inject: any },\r\n _key: any,\r\n descriptor: any) => {\r\n // handle when used as a constructor parameter decorator\r\n if (typeof descriptor === 'number') {\r\n autoinject(target);\r\n if (rest.length === 1) {\r\n target.inject[descriptor] = rest[0];\r\n }\r\n return;\r\n }\r\n // if it's true then we injecting rest into function and not Class constructor\r\n if (descriptor) {\r\n const fn = descriptor.value;\r\n fn.inject = rest;\r\n } else {\r\n target.inject = rest;\r\n }\r\n };\r\n}\r\n","import { protocol } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { autoinject } from './injection';\r\nimport type {\r\n PrimitiveOrDependencyCtor,\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n DependencyCtor,\r\n DependencyFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Indicates that the decorated class/object is a custom resolver.\r\n */\r\nexport const resolver: {\r\n decorates?: (key: any) => key is { get(container: Container, key: any): any };\r\n} & (() => any) = ((protocol as unknown) as { create(...args: any[]): any }).create(\r\n 'aurelia:resolver',\r\n (target): string | boolean => {\r\n if (!(typeof target.get === 'function')) {\r\n return 'Resolvers must implement: get(container: Container, key: any): any';\r\n }\r\n\r\n return true;\r\n }\r\n);\r\n\r\n/**\r\n * Used to allow functions/classes to specify custom dependency resolution logic.\r\n */\r\nexport interface Resolver {\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n get(container: Container, key: any): any;\r\n}\r\n\r\nexport enum Strategy {\r\n instance = 0,\r\n singleton = 1,\r\n transient = 2,\r\n function = 3,\r\n array = 4,\r\n alias = 5\r\n}\r\nexport type IStrategy = 1 | 2 | 3 | 4 | 5;\r\n\r\nexport type StrategyFunctor<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > = (\r\n container?: Container,\r\n ctor?: PrimitiveOrDependencyCtorOrFunctor,\r\n strategyResolver?: any\r\n ) => TImpl;\r\n\r\nexport interface StrategyState<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > {\r\n [Strategy.instance]: TImpl;\r\n [Strategy.singleton]: DependencyCtorOrFunctor;\r\n [Strategy.transient]: DependencyCtorOrFunctor;\r\n [Strategy.function]: StrategyFunctor;\r\n /**\r\n * For typings purposes, this is done as ({ get: StrategyFunctor } | TImpl)[]\r\n * But it should be understood, and used as [{ get: StrategyFunctor }, ...TImp[]]\r\n */\r\n [Strategy.array]: ({\r\n get: (\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor\r\n ) => TImpl\r\n } | TImpl)[];\r\n [Strategy.alias]: any;\r\n}\r\n\r\nfunction isStrategy<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TKey extends keyof StrategyState\r\n>(\r\n actual: Strategy,\r\n expected: TKey,\r\n state):\r\n state is StrategyState[TKey] {\r\n return actual === expected;\r\n}\r\n/**\r\n * Used to resolve instances, singletons, transients, aliases\r\n */\r\n@resolver()\r\nexport class StrategyResolver<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TStrategyKey extends keyof StrategyState> {\r\n\r\n public strategy: keyof StrategyState;\r\n public state: StrategyState[keyof StrategyState];\r\n\r\n /**\r\n * Creates an instance of the StrategyResolver class.\r\n * @param strategy The type of resolution strategy.\r\n * @param state The state associated with the resolution strategy.\r\n */\r\n constructor(strategy: TStrategyKey, state: StrategyState[TStrategyKey]) {\r\n this.strategy = strategy;\r\n this.state = state;\r\n }\r\n\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n public get(container: Container, key: PrimitiveOrDependencyCtor) {\r\n if (isStrategy(this.strategy, Strategy.instance, this.state)) {\r\n return this.state;\r\n }\r\n if (isStrategy(this.strategy, Strategy.singleton, this.state)) {\r\n const singleton = container.invoke(this.state);\r\n this.state = singleton;\r\n this.strategy = 0;\r\n return singleton;\r\n }\r\n if (isStrategy(this.strategy, Strategy.transient, this.state)) {\r\n return container.invoke(this.state);\r\n }\r\n if (isStrategy(this.strategy, Strategy.function, this.state)) {\r\n return this.state(container, key, this);\r\n }\r\n if (isStrategy(this.strategy, Strategy.array, this.state)) {\r\n return (this.state[0] as { get: StrategyFunctor }).get(container, key);\r\n }\r\n if (isStrategy(this.strategy, Strategy.alias, this.state)) {\r\n return container.get(this.state) as TImpl;\r\n }\r\n throw new Error('Invalid strategy: ' + this.strategy);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify lazy resolution logic.\r\n */\r\n@resolver()\r\nexport class Lazy = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'lazy';\r\n\r\n /**\r\n * Creates an instance of the Lazy class.\r\n * @param key The key to lazily resolve.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to lazily resolve the dependency into a lazy locator\r\n * function.\r\n * @param container The container to resolve from.\r\n * @return Returns a function which can be invoked at a later time to obtain\r\n * the actual dependency.\r\n */\r\n public get(container: Container): () => ImplOrAny {\r\n return () => container.get(this._key);\r\n }\r\n\r\n /**\r\n * Creates a Lazy Resolver for the supplied key.\r\n * @param key The key to lazily resolve.\r\n * @return Returns an instance of Lazy for the key.\r\n */\r\n public static of<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ) {\r\n return new Lazy(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify resolution of all matches to a key.\r\n */\r\n@resolver()\r\nexport class All = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'all';\r\n\r\n /**\r\n * Creates an instance of the All class.\r\n * @param key The key to lazily resolve all matches for.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to resolve all matching dependencies as an array of\r\n * instances.\r\n * @param container The container to resolve from.\r\n * @return Returns an array of all matching instances.\r\n */\r\n public get(container: Container): TImpl[] {\r\n return container.getAll(this._key);\r\n }\r\n\r\n /**\r\n * Creates an All Resolver for the supplied key.\r\n * @param key The key to resolve all instances for.\r\n * @return Returns an instance of All for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): All {\r\n return new All(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify an optional dependency, which will\r\n * be resolved only if already registred with the container.\r\n */\r\n@resolver()\r\nexport class Optional = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /** @internal */\r\n public _checkParent: boolean;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'optional';\r\n\r\n /**\r\n * Creates an instance of the Optional class.\r\n * @param key The key to optionally resolve for.\r\n * @param checkParent Indicates whether or not the parent container hierarchy\r\n * should be checked.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor, checkParent: boolean = true) {\r\n this._key = key;\r\n this._checkParent = checkParent;\r\n }\r\n\r\n /**\r\n * Called by the container to provide optional resolution of the key.\r\n * @param container The container to resolve from.\r\n * @return Returns the instance if found; otherwise null.\r\n */\r\n public get(container: Container): TImpl | null {\r\n if (container.hasResolver(this._key, this._checkParent)) {\r\n return container.get(this._key);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Creates an Optional Resolver for the supplied key.\r\n * @param key The key to optionally resolve for.\r\n * @param [checkParent=true] Indicates whether or not the parent container\r\n * hierarchy should be checked.\r\n * @return Returns an instance of Optional for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n checkParent: boolean = true): Optional {\r\n return new Optional(key, checkParent);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject the dependency from the parent container instead of the current\r\n * one.\r\n */\r\n@resolver()\r\nexport class Parent = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'parent';\r\n\r\n /**\r\n * Creates an instance of the Parent class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to load the dependency from the parent container\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container): TImpl | null {\r\n return container.parent ? container.parent.get(this._key) : null;\r\n }\r\n\r\n /**\r\n * Creates a Parent Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Parent for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): Parent {\r\n return new Parent(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow injecting dependencies but also passing data to the constructor.\r\n */\r\n@resolver()\r\nexport class Factory = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtorOrFunctor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'factory';\r\n\r\n /**\r\n * Creates an instance of the Factory class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to pass the dependencies to the constructor.\r\n * @param container The container to invoke the constructor with dependencies\r\n * and other parameters.\r\n * @return Returns a function that can be invoked to resolve dependencies\r\n * later, and the rest of the parameters.\r\n */\r\n public get(container: Container): DependencyFunctor {\r\n let fn = this._key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === Strategy.function) {\r\n fn = resolver.state;\r\n }\r\n\r\n return (...rest) => container.invoke(fn as DependencyCtorOrFunctor, rest);\r\n }\r\n\r\n /**\r\n * Creates a Factory Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Factory for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: DependencyCtor\r\n ): Factory {\r\n return new Factory(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject a new instance of a dependency, without regard for existing\r\n * instances in the container. Instances can optionally be registered in the\r\n * container\r\n * under a different key by supplying a key using the `as` method.\r\n */\r\n@resolver()\r\nexport class NewInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public key: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public asKey: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public dynamicDependencies: TArgs[number][];\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'newInstance';\r\n\r\n /**\r\n * Creates an instance of the NewInstance class.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor, ...dynamicDependencies: TArgs[number][]) {\r\n this.key = key;\r\n this.asKey = key;\r\n this.dynamicDependencies = dynamicDependencies;\r\n }\r\n\r\n /**\r\n * Called by the container to instantiate the dependency and potentially\r\n * register\r\n * as another key if the `as` method was used.\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container) {\r\n const dynamicDependencies =\r\n this.dynamicDependencies.length > 0\r\n ? this.dynamicDependencies.map(dependency =>\r\n dependency['protocol:aurelia:resolver']\r\n ? dependency.get(container)\r\n : container.get(dependency)\r\n )\r\n : undefined;\r\n\r\n let fn = this.key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === 3) {\r\n fn = resolver.state;\r\n }\r\n\r\n const instance = container.invoke(fn as DependencyCtorOrFunctor, dynamicDependencies);\r\n container.registerInstance(this.asKey, instance);\r\n return instance;\r\n }\r\n\r\n /**\r\n * Instructs the NewInstance resolver to register the resolved instance using\r\n * the supplied key.\r\n * @param key The key to register the instance with.\r\n * @return Returns the NewInstance resolver.\r\n */\r\n public as(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this.asKey = key;\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates an NewInstance Resolver for the supplied key.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n * @return Returns an instance of NewInstance for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtorOrFunctor,\r\n ...dynamicDependencies: TArgs[number][]): NewInstance {\r\n return new NewInstance(key, ...dynamicDependencies);\r\n }\r\n}\r\n\r\n/**\r\n * Used by parameter decorators to call autoinject for the target and retrieve\r\n * the target's inject property.\r\n * @param target The target class.\r\n * @return Returns the target's own inject property.\r\n */\r\nexport function getDecoratorDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] }\r\n ) {\r\n autoinject(target);\r\n\r\n return target.inject;\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should be lazy loaded\r\n */\r\nexport function lazy<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: { new (...args: TArgs): TBase | TImpl },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Lazy.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should load all instances of the given\r\n * key.\r\n */\r\nexport function all<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = All.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as optional\r\n */\r\nexport function optional<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n checkParentOrTarget: boolean = true) {\r\n const deco = (checkParent: boolean) => {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Optional.of(inject[index], checkParent);\r\n };\r\n };\r\n if (typeof checkParentOrTarget === 'boolean') {\r\n return deco(checkParentOrTarget);\r\n }\r\n return deco(true);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to look at the parent container for\r\n * resolution\r\n */\r\nexport function parent<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Parent.of(inject[index]);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to create a factory method, that can\r\n * accept optional arguments\r\n */\r\nexport function factory<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Factory.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as a new instance. Instances can optionally be registered in the container\r\n * under a different key and/or use dynamic dependencies\r\n */\r\nexport function newInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n asKeyOrTarget?: PrimitiveOrDependencyCtor & { inject?: TArgs[number][] },\r\n ...dynamicDependencies: TArgs[number][]\r\n) {\r\n const deco = (asKey?: typeof asKeyOrTarget) => {\r\n return (\r\n target: { new (...args: any[]): any },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = NewInstance.of(inject[index], ...dynamicDependencies);\r\n if (!!asKey) {\r\n inject[index].as(asKey);\r\n }\r\n };\r\n };\r\n if (arguments.length >= 1) {\r\n return deco(asKeyOrTarget);\r\n }\r\n return deco();\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { AggregateError } from 'aurelia-pal';\r\nimport { resolver, StrategyResolver, Resolver, Strategy, StrategyState, Factory, NewInstance, Lazy, Optional, All, Parent } from './resolvers';\r\nimport { Invoker } from './invokers';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n DependencyCtor,\r\n PrimitiveOrDependencyCtor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args,\r\n Primitive\r\n} from './types';\r\n\r\nlet currentContainer: Container | null = null;\r\n\r\nfunction validateKey(key: any) {\r\n if (key === null || key === undefined) {\r\n throw new Error(\r\n 'key/value cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport const _emptyParameters = Object.freeze([]) as [];\r\n\r\nmetadata.registration = 'aurelia:registration';\r\nmetadata.invoker = 'aurelia:invoker';\r\n\r\nconst resolverDecorates = resolver.decorates!;\r\n\r\n/**\r\n * Stores the information needed to invoke a function.\r\n */\r\nexport class InvocationHandler<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args\r\n > {\r\n /**\r\n * The function to be invoked by this handler.\r\n */\r\n public fn: DependencyCtorOrFunctor;\r\n\r\n /**\r\n * The invoker implementation that will be used to actually invoke the function.\r\n */\r\n public invoker: Invoker;\r\n\r\n /**\r\n * The statically known dependencies of this function invocation.\r\n */\r\n public dependencies: TArgs;\r\n\r\n /**\r\n * Instantiates an InvocationDescription.\r\n * @param fn The Function described by this description object.\r\n * @param invoker The strategy for invoking the function.\r\n * @param dependencies The static dependencies of the function call.\r\n */\r\n constructor(\r\n fn: DependencyCtorOrFunctor,\r\n invoker: Invoker,\r\n dependencies: TArgs\r\n ) {\r\n this.fn = fn;\r\n this.invoker = invoker;\r\n this.dependencies = dependencies;\r\n }\r\n\r\n /**\r\n * Invokes the function.\r\n * @param container The calling container.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(container: Container, dynamicDependencies?: TArgs[]): TImpl {\r\n const previousContainer = currentContainer;\r\n currentContainer = container;\r\n try {\r\n return dynamicDependencies !== undefined\r\n ? this.invoker.invokeWithDynamicDependencies(\r\n container,\r\n this.fn,\r\n this.dependencies,\r\n dynamicDependencies\r\n )\r\n : this.invoker.invoke(container, this.fn, this.dependencies);\r\n } finally {\r\n currentContainer = previousContainer;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Used to configure a Container instance.\r\n */\r\nexport interface ContainerConfiguration {\r\n /**\r\n * An optional callback which will be called when any function needs an\r\n * InvocationHandler created (called once per Function).\r\n */\r\n onHandlerCreated?: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n handlers?: Map;\r\n}\r\n\r\nfunction invokeWithDynamicDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n) {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n let lookup;\r\n\r\n while (i--) {\r\n lookup = staticDependencies[i];\r\n\r\n if (lookup === null || lookup === undefined) {\r\n throw new Error(\r\n 'Constructor Parameter with index ' +\r\n i +\r\n ' cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n } else {\r\n args[i] = container.get(lookup);\r\n }\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return Reflect.construct(fn, args);\r\n}\r\n\r\nconst classInvoker: Invoker = {\r\n invoke(container, Type: DependencyCtor, deps) {\r\n const instances = deps.map((dep) => container.get(dep));\r\n return Reflect.construct(Type, instances);\r\n },\r\n invokeWithDynamicDependencies\r\n};\r\n\r\nfunction getDependencies(f) {\r\n if (!f.hasOwnProperty('inject')) {\r\n return [];\r\n }\r\n\r\n if (typeof f.inject === 'function') {\r\n return f.inject();\r\n }\r\n\r\n return f.inject;\r\n}\r\n\r\n/**\r\n * A lightweight, extensible dependency injection container.\r\n */\r\nexport class Container {\r\n /**\r\n * The global root Container instance. Available if makeGlobal() has been\r\n * called. Aurelia Framework calls makeGlobal().\r\n */\r\n public static instance: Container;\r\n\r\n /**\r\n * The parent container in the DI hierarchy.\r\n */\r\n public parent: Container | null;\r\n\r\n /**\r\n * The root container in the DI hierarchy.\r\n */\r\n public root: Container;\r\n\r\n /** @internal */\r\n public _configuration: ContainerConfiguration;\r\n\r\n /** @internal */\r\n public _onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n /** @internal */\r\n public _handlers: Map;\r\n\r\n /** @internal */\r\n public _resolvers: Map;\r\n\r\n /**\r\n * Creates an instance of Container.\r\n * @param configuration Provides some configuration for the new Container instance.\r\n */\r\n constructor(configuration?: ContainerConfiguration) {\r\n if (configuration === undefined) {\r\n configuration = {};\r\n }\r\n\r\n this._configuration = configuration;\r\n this._onHandlerCreated = configuration.onHandlerCreated!;\r\n this._handlers =\r\n configuration.handlers || (configuration.handlers = new Map());\r\n this._resolvers = new Map();\r\n this.root = this;\r\n this.parent = null;\r\n }\r\n\r\n /**\r\n * Makes this container instance globally reachable through Container.instance.\r\n */\r\n public makeGlobal(): Container {\r\n Container.instance = this;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets an invocation handler creation callback that will be called when new\r\n * InvocationsHandlers are created (called once per Function).\r\n * @param onHandlerCreated The callback to be called when an\r\n * InvocationsHandler is created.\r\n */\r\n public setHandlerCreatedCallback<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler\r\n ) {\r\n this._onHandlerCreated = onHandlerCreated;\r\n this._configuration.onHandlerCreated = onHandlerCreated;\r\n }\r\n\r\n /**\r\n * Registers an existing object instance with the container.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param instance The instance that will be resolved when the key is matched.\r\n * This defaults to the key value when instance is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerInstance = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n instance?: TImpl): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(0, instance === undefined ? key : instance)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container always\r\n * returns the same instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.singleton, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container returns a\r\n * new instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(2, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param handler The resolution function to use when the dependency is\r\n * needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerHandler = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n handler: (container?: Container, key?: PrimitiveOrDependencyCtor, resolver?: Resolver) => any\r\n ): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.function, handler)\r\n );\r\n }\r\n\r\n /**\r\n * Registers an additional key that serves as an alias to the original DI key.\r\n * @param originalKey The key that originally identified the dependency; usually a constructor function.\r\n * @param aliasKey An alternate key which can also be used to resolve the same dependency as the original.\r\n * @return The resolver that was registered.\r\n */\r\n public registerAlias = Impl, TArgs extends Args = Args>(\r\n originalKey: PrimitiveOrDependencyCtor,\r\n aliasKey: PrimitiveOrDependencyCtor): Resolver {\r\n return this.registerResolver(\r\n aliasKey,\r\n new StrategyResolver(5, originalKey)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param resolver The resolver to use when the dependency is needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n resolver: Resolver\r\n ): Resolver {\r\n validateKey(key);\r\n\r\n const allResolvers = this._resolvers;\r\n const result = allResolvers.get(key);\r\n\r\n if (result === undefined) {\r\n allResolvers.set(key, resolver);\r\n } else if (result.strategy === 4) {\r\n result.state.push(resolver);\r\n } else {\r\n allResolvers.set(key, new StrategyResolver(4, [result, resolver]));\r\n }\r\n\r\n return resolver;\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) by inspecting its registration\r\n * annotations. If none are found, then the default singleton registration is\r\n * used.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n */\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n fn = fn === undefined ? key as DependencyCtor : fn;\r\n\r\n if (typeof fn === 'function') {\r\n const registration = metadata.get(metadata.registration, fn);\r\n\r\n if (registration === undefined) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn));\r\n }\r\n\r\n return registration.registerResolver(this, key, fn);\r\n }\r\n\r\n return this.registerResolver(key, new StrategyResolver(0, fn));\r\n }\r\n\r\n /**\r\n * Registers an array of types (constructor functions) by inspecting their\r\n * registration annotations. If none are found, then the default singleton\r\n * registration is used.\r\n * @param fns The constructor function to use when the dependency needs to be instantiated.\r\n */\r\n public autoRegisterAll(fns: DependencyCtor[]): void {\r\n let i = fns.length;\r\n while (i--) {\r\n this.autoRegister(fns[i]);\r\n }\r\n }\r\n\r\n /**\r\n * Unregisters based on key.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n */\r\n public unregister(key: any): void {\r\n this._resolvers.delete(key);\r\n }\r\n\r\n /**\r\n * Inspects the container to determine if a particular key has been registred.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @param checkParent Indicates whether or not to check the parent container hierarchy.\r\n * @return Returns true if the key has been registred; false otherwise.\r\n */\r\n public hasResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, checkParent: boolean = false): boolean {\r\n validateKey(key);\r\n\r\n return (\r\n this._resolvers.has(key) ||\r\n (checkParent &&\r\n this.parent !== null &&\r\n this.parent.hasResolver(key, checkParent))\r\n );\r\n }\r\n\r\n /**\r\n * Gets the resolver for the particular key, if it has been registered.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @return Returns the resolver, if registred, otherwise undefined.\r\n */\r\n public getResolver<\r\n TStrategyKey extends keyof StrategyState,\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n >(\r\n key: PrimitiveOrDependencyCtorOrFunctor\r\n ): StrategyResolver {\r\n return this._resolvers.get(key);\r\n }\r\n\r\n /**\r\n * Resolves a single instance based on the provided key.\r\n * @param key The key that identifies the object to resolve.\r\n * @return Returns the resolved instance.\r\n */\r\n public get | Lazy | Factory | Optional | Parent | All>(\r\n key: TResolver): ResolvedValue;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: typeof Container): Container;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor | typeof Container): ImplOrAny | Container {\r\n validateKey(key);\r\n\r\n if (key === Container) {\r\n return this;\r\n }\r\n\r\n if (resolverDecorates(key)) {\r\n return key.get(this, key);\r\n }\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key as DependencyCtor).get(this, key);\r\n }\r\n\r\n const registration = metadata.get(metadata.registration, key);\r\n\r\n if (registration === undefined) {\r\n return this.parent._get(key);\r\n }\r\n\r\n return registration.registerResolver(\r\n this, key, key as DependencyCtorOrFunctor).get(this, key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n public _get(key) {\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n\r\n return this.parent._get(key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n /**\r\n * Resolves all instance registered under the provided key.\r\n * @param key The key that identifies the objects to resolve.\r\n * @return Returns an array of the resolved instances.\r\n */\r\n public getAll = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny[] {\r\n validateKey(key);\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return _emptyParameters;\r\n }\r\n\r\n return this.parent.getAll(key);\r\n }\r\n\r\n if (resolver.strategy === 4) {\r\n const state = resolver.state;\r\n let i = state.length;\r\n const results = new Array(i);\r\n\r\n while (i--) {\r\n results[i] = state[i].get(this, key);\r\n }\r\n\r\n return results;\r\n }\r\n\r\n return [resolver.get(this, key)];\r\n }\r\n\r\n /**\r\n * Creates a new dependency injection container whose parent is the current container.\r\n * @return Returns a new container instance parented to this.\r\n */\r\n public createChild(): Container {\r\n const child = new Container(this._configuration);\r\n child.root = this.root;\r\n child.parent = this;\r\n return child;\r\n }\r\n\r\n /**\r\n * Invokes a function, recursively resolving its dependencies.\r\n * @param fn The function to invoke with the auto-resolved dependencies.\r\n * @param dynamicDependencies Additional function dependencies to use during invocation.\r\n * @return Returns the instance resulting from calling the function.\r\n */\r\n public invoke = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor,\r\n dynamicDependencies?: TArgs[number][]\r\n ): ImplOrAny {\r\n try {\r\n let handler = this._handlers.get(fn);\r\n\r\n if (handler === undefined) {\r\n handler = this._createInvocationHandler(fn);\r\n this._handlers.set(fn, handler);\r\n }\r\n\r\n return handler.invoke(this, dynamicDependencies);\r\n } catch (e) {\r\n // @ts-expect-error AggregateError returns an Error in its type hence it fails (new ...) but it's fine\r\n throw new AggregateError(\r\n `Error invoking ${fn.name}. Check the inner error for details.`,\r\n e as Error | undefined,\r\n true\r\n );\r\n }\r\n }\r\n\r\n public _createInvocationHandler\r\n = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor & { inject?: any; }\r\n ): InvocationHandler {\r\n let dependencies;\r\n\r\n if (fn.inject === undefined) {\r\n dependencies =\r\n metadata.getOwn(metadata.paramTypes, fn) || _emptyParameters;\r\n } else {\r\n dependencies = [];\r\n let ctor = fn;\r\n while (typeof ctor === 'function') {\r\n dependencies.push(...getDependencies(ctor));\r\n ctor = Object.getPrototypeOf(ctor);\r\n }\r\n }\r\n\r\n const invoker = metadata.getOwn(metadata.invoker, fn) || classInvoker;\r\n\r\n const handler = new InvocationHandler(fn, invoker, dependencies);\r\n return this._onHandlerCreated !== undefined\r\n ? this._onHandlerCreated(handler)\r\n : handler;\r\n }\r\n}\r\n\r\nexport type ResolvedValue =\r\n T extends { new (...args: any[]): infer R }\r\n ? R\r\n : T extends Factory\r\n ? (...args: unknown[]) => R\r\n : T extends Lazy\r\n ? () => R\r\n : T extends NewInstance\r\n ? R\r\n : T extends Optional\r\n ? R | null\r\n : T extends All\r\n ? R[]\r\n : T extends Parent\r\n ? R | null\r\n : T extends [infer T1, ...infer T2]\r\n ? [ResolvedValue, ...ResolvedValue]\r\n : T;\r\n\r\n/**\r\n * Resolve a key, or list of keys based on the current container.\r\n * \r\n * @example\r\n * ```ts\r\n * import { resolve } from 'aurelia-framework';\r\n * // or\r\n * // import { Container, resolve } from 'aurelia-dependency-injection';\r\n * \r\n * class MyCustomElement {\r\n * someService = resolve(MyService);\r\n * }\r\n * ```\r\n */\r\nexport function resolve(key: K): ResolvedValue;\r\nexport function resolve(...keys: K): ResolvedValue\r\nexport function resolve(...keys: K) {\r\n if (currentContainer == null) {\r\n throw new Error(`There is not a currently active container to resolve \"${String(keys)}\". Are you trying to \"new SomeClass(...)\" that has a resolve(...) call?`);\r\n }\r\n \r\n return keys.length === 1\r\n ? currentContainer.get(keys[0])\r\n : keys.map(containerGetKey, currentContainer);\r\n}\r\n\r\nfunction containerGetKey(this: Container, key: any) {\r\n return this.get(key);\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { DependencyCtorOrFunctor, ImplOrAny, Impl, Args, DependencyCtor, DependencyFunctor } from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom Invoker for the decorated item.\r\n */\r\nexport function invoker, TArgs extends Args>(\r\n value: Invoker\r\n): (target: DependencyCtor) => void {\r\n return target => {\r\n metadata.define(metadata.invoker, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies that the decorated item should be called as a factory\r\n * function, rather than a constructor.\r\n */\r\nexport function invokeAsFactory, TArgs extends Args>(\r\n potentialTarget?: DependencyCtor\r\n): void | ((target: DependencyCtor) => void) {\r\n const deco = (target: DependencyCtor) => {\r\n metadata.define(metadata.invoker, FactoryInvoker.instance, target);\r\n };\r\n\r\n return potentialTarget ? deco(potentialTarget) : deco;\r\n}\r\n\r\n/**\r\n * A strategy for invoking a function, resulting in an object instance.\r\n */\r\nexport interface Invoker, TArgs extends Args> {\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during\r\n * invocation.\r\n * @return The result of the function invocation.\r\n */\r\n invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny;\r\n}\r\n\r\n/**\r\n * An Invoker that is used to invoke a factory method.\r\n */\r\nexport class FactoryInvoker<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > implements Invoker {\r\n /**\r\n * The singleton instance of the FactoryInvoker.\r\n */\r\n public static instance: FactoryInvoker;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny {\r\n let i = dependencies.length;\r\n const args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(dependencies[i]);\r\n }\r\n\r\n return ((fn as DependencyFunctor).apply(undefined, args as TArgs)) as ImplOrAny;\r\n }\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(staticDependencies[i]);\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return (fn as DependencyFunctor).apply(undefined, args as TArgs) as ImplOrAny;\r\n }\r\n}\r\n\r\nFactoryInvoker.instance = new FactoryInvoker();\r\n","import './internal';\r\nimport { Resolver } from './resolvers';\r\nimport { Container } from './container';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtor,\r\n Impl,\r\n Args,\r\n DependencyCtor\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom registration strategy for the decorated\r\n * class/function.\r\n */\r\nexport function registration, TArgs extends Args>(\r\n value: Registration) {\r\n return (target: DependencyCtor) => {\r\n metadata.define(metadata.registration, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"transient\"\r\n * lifetime.\r\n */\r\nexport function transient, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor) {\r\n return registration(new TransientRegistration(key));\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"singleton\"\r\n * lifetime.\r\n */\r\nexport function singleton(registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor, registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean, registerInChild: boolean = false) {\r\n return registration(\r\n new SingletonRegistration(keyOrRegisterInChild, registerInChild)\r\n );\r\n}\r\n\r\n/**\r\n * Customizes how a particular function is resolved by the Container.\r\n */\r\nexport interface Registration<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args> {\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver;\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * transients with the container.\r\n */\r\nexport class TransientRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of TransientRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(key?: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const existingResolver = container.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? container.registerTransient(\r\n (this._key || key) as string,\r\n fn as DependencyCtorOrFunctor)\r\n : existingResolver;\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * singletons with the container.\r\n */\r\nexport class SingletonRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _registerInChild: boolean;\r\n\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of SingletonRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean,\r\n registerInChild: boolean = false) {\r\n if (typeof keyOrRegisterInChild === 'boolean') {\r\n this._registerInChild = keyOrRegisterInChild;\r\n } else {\r\n this._key = keyOrRegisterInChild;\r\n this._registerInChild = registerInChild;\r\n }\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const targetContainer = this._registerInChild ? container : container.root;\r\n const existingResolver = targetContainer.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? targetContainer.registerSingleton(this._key || key, fn)\r\n : existingResolver;\r\n }\r\n}\r\n"],"names":["metadata","protocol","Strategy","AggregateError"],"mappings":";;;;;;IAAA;IACA;AACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AACA;AAsCA;IACO,SAAS,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;IAC1D,IAAI,IAAI,CAAC,GAAG,SA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AiB,EAC1B,IAAI,CAAC,IAAI,IAAI,GAAG,GACjB,EAAkD,CAAC;kBACnD,gBAAgB,CAAC;SACtB,CAAA;QACH,OAAC,qBAAA,CAAA;IAAD,CAAC,EAAA,EAAA;AAMD,QAAA,qBAAA,IAAA,YAAA;QAYE,SACE,qBAAA,CAAA,oBAA+E,EAC/E,eAAgC,EAAA;IAAhC,QAAA,IAAA,eAAA,KAAA,KAAA,CAAA,EAAA,EAAA,eAAgC,GAAA,KAAA,CAAA,EAAA;IAChC,QAAA,IAAI,OAAO,oBAAoB,KAAK,SAAS,EAAE;IAC7C,YAAA,IAAI,CAAC,gBAAgB,GAAG,oBAAoB,CAAC;aAC9C;iBAAM;IACL,YAAA,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;IACjC,YAAA,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;aACzC;SACF;IASM,IAAA,qBAAA,CAAA,SAAA,CAAA,gBAAgB,GAAvB,UACE,SAAoB,EACpB,GAAmD,EACnD,EAAgD,EAAA;IAEhD,QAAA,IAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC;IAC3E,QAAA,IAAM,gBAAgB,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC;YACvE,OAAO,gBAAgB,KAAK,SAAS;IACnC,cAAE,eAAe,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,EAAE,EAAE,CAAC;kBACvD,gBAAgB,CAAC;SACtB,CAAA;QACH,OAAC,qBAAA,CAAA;IAAD,CAAC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]} \ No newline at end of file +{"version":3,"file":"aurelia-dependency-injection.js","sources":["../../node_modules/tslib/tslib.es6.js","../../../src/injection.ts","../../../src/resolvers.ts","../../../src/container.ts","../../../src/invokers.ts","../../../src/registrations.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","import { metadata } from 'aurelia-metadata';\r\nimport { _emptyParameters } from './container';\r\nimport { Args, Impl, DependencyCtor } from './types';\r\n\r\n// tslint:disable-next-line:ban-types\r\nexport type Injectable = Function & { inject?: any[] | (() => any[]) };\r\n\r\nfunction isInjectable(potentialTarget: any): potentialTarget is Injectable {\r\n return !!potentialTarget;\r\n}\r\n\r\n/**\r\n * Decorator: Directs the TypeScript transpiler to write-out type metadata for\r\n * the decorated class.\r\n */\r\nexport function autoinject(\r\n potentialTarget?: TPotential\r\n): TPotential extends Injectable ? void : (target: Injectable) => void {\r\n const deco = (target: Injectable): void => {\r\n if (!target.hasOwnProperty('inject')) {\r\n target.inject = (\r\n (metadata.getOwn(metadata.paramTypes, target) as any[]) ||\r\n _emptyParameters\r\n ).slice();\r\n if (target.inject && target.inject.length > 0) {\r\n // TypeScript 3.0 metadata for \"...rest\" gives type \"Object\"\r\n // if last parameter is \"Object\", assume it's a ...rest and remove that\r\n // metadata.\r\n if (target.inject[target.inject.length - 1] === Object) {\r\n target.inject.splice(-1, 1);\r\n }\r\n }\r\n }\r\n };\r\n if (isInjectable(potentialTarget)) {\r\n return deco(potentialTarget) as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n }\r\n return deco as TPotential extends Injectable ? void : (target: Injectable) => void;\r\n}\r\n/**\r\n * Decorator: Specifies the dependencies that should be injected by the DI Container into the decorated class/function.\r\n */\r\nexport function inject<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(...rest: TArgs[number][]): any {\r\n return (\r\n target: DependencyCtor & { inject: any },\r\n _key: any,\r\n descriptor: any) => {\r\n // handle when used as a constructor parameter decorator\r\n if (typeof descriptor === 'number') {\r\n autoinject(target);\r\n if (rest.length === 1) {\r\n target.inject[descriptor] = rest[0];\r\n }\r\n return;\r\n }\r\n // if it's true then we injecting rest into function and not Class constructor\r\n if (descriptor) {\r\n const fn = descriptor.value;\r\n fn.inject = rest;\r\n } else {\r\n target.inject = rest;\r\n }\r\n };\r\n}\r\n","import { protocol } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { autoinject } from './injection';\r\nimport type {\r\n PrimitiveOrDependencyCtor,\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n DependencyCtor,\r\n DependencyFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Indicates that the decorated class/object is a custom resolver.\r\n */\r\nexport const resolver: {\r\n decorates?: (key: any) => key is { get(container: Container, key: any): any };\r\n} & (() => any) = ((protocol as unknown) as { create(...args: any[]): any }).create(\r\n 'aurelia:resolver',\r\n (target): string | boolean => {\r\n if (!(typeof target.get === 'function')) {\r\n return 'Resolvers must implement: get(container: Container, key: any): any';\r\n }\r\n\r\n return true;\r\n }\r\n);\r\n\r\n/**\r\n * Used to allow functions/classes to specify custom dependency resolution logic.\r\n */\r\nexport interface Resolver {\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n get(container: Container, key: any): any;\r\n}\r\n\r\nexport enum Strategy {\r\n instance = 0,\r\n singleton = 1,\r\n transient = 2,\r\n function = 3,\r\n array = 4,\r\n alias = 5\r\n}\r\nexport type IStrategy = 1 | 2 | 3 | 4 | 5;\r\n\r\nexport type StrategyFunctor<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > = (\r\n container?: Container,\r\n ctor?: PrimitiveOrDependencyCtorOrFunctor,\r\n strategyResolver?: any\r\n ) => TImpl;\r\n\r\nexport interface StrategyState<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > {\r\n [Strategy.instance]: TImpl;\r\n [Strategy.singleton]: DependencyCtorOrFunctor;\r\n [Strategy.transient]: DependencyCtorOrFunctor;\r\n [Strategy.function]: StrategyFunctor;\r\n /**\r\n * For typings purposes, this is done as ({ get: StrategyFunctor } | TImpl)[]\r\n * But it should be understood, and used as [{ get: StrategyFunctor }, ...TImp[]]\r\n */\r\n [Strategy.array]: ({\r\n get: (\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor\r\n ) => TImpl\r\n } | TImpl)[];\r\n [Strategy.alias]: any;\r\n}\r\n\r\nfunction isStrategy<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TKey extends keyof StrategyState\r\n>(\r\n actual: Strategy,\r\n expected: TKey,\r\n state):\r\n state is StrategyState[TKey] {\r\n return actual === expected;\r\n}\r\n/**\r\n * Used to resolve instances, singletons, transients, aliases\r\n */\r\n@resolver()\r\nexport class StrategyResolver<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args,\r\n TStrategyKey extends keyof StrategyState> {\r\n\r\n public strategy: keyof StrategyState;\r\n public state: StrategyState[keyof StrategyState];\r\n\r\n /**\r\n * Creates an instance of the StrategyResolver class.\r\n * @param strategy The type of resolution strategy.\r\n * @param state The state associated with the resolution strategy.\r\n */\r\n constructor(strategy: TStrategyKey, state: StrategyState[TStrategyKey]) {\r\n this.strategy = strategy;\r\n this.state = state;\r\n }\r\n\r\n /**\r\n * Called by the container to allow custom resolution of dependencies for a\r\n * function/class.\r\n * @param container The container to resolve from.\r\n * @param key The key that the resolver was registered as.\r\n * @return Returns the resolved object.\r\n */\r\n public get(container: Container, key: PrimitiveOrDependencyCtor) {\r\n if (isStrategy(this.strategy, Strategy.instance, this.state)) {\r\n return this.state;\r\n }\r\n if (isStrategy(this.strategy, Strategy.singleton, this.state)) {\r\n const singleton = container.invoke(this.state);\r\n this.state = singleton;\r\n this.strategy = 0;\r\n return singleton;\r\n }\r\n if (isStrategy(this.strategy, Strategy.transient, this.state)) {\r\n return container.invoke(this.state);\r\n }\r\n if (isStrategy(this.strategy, Strategy.function, this.state)) {\r\n return this.state(container, key, this);\r\n }\r\n if (isStrategy(this.strategy, Strategy.array, this.state)) {\r\n return (this.state[0] as { get: StrategyFunctor }).get(container, key);\r\n }\r\n if (isStrategy(this.strategy, Strategy.alias, this.state)) {\r\n return container.get(this.state) as TImpl;\r\n }\r\n throw new Error('Invalid strategy: ' + this.strategy);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify lazy resolution logic.\r\n */\r\n@resolver()\r\nexport class Lazy = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'lazy';\r\n\r\n /**\r\n * Creates an instance of the Lazy class.\r\n * @param key The key to lazily resolve.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to lazily resolve the dependency into a lazy locator\r\n * function.\r\n * @param container The container to resolve from.\r\n * @return Returns a function which can be invoked at a later time to obtain\r\n * the actual dependency.\r\n */\r\n public get(container: Container): () => ImplOrAny {\r\n return () => container.get(this._key);\r\n }\r\n\r\n /**\r\n * Creates a Lazy Resolver for the supplied key.\r\n * @param key The key to lazily resolve.\r\n * @return Returns an instance of Lazy for the key.\r\n */\r\n public static of<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ) {\r\n return new Lazy(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify resolution of all matches to a key.\r\n */\r\n@resolver()\r\nexport class All = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'all';\r\n\r\n /**\r\n * Creates an instance of the All class.\r\n * @param key The key to lazily resolve all matches for.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to resolve all matching dependencies as an array of\r\n * instances.\r\n * @param container The container to resolve from.\r\n * @return Returns an array of all matching instances.\r\n */\r\n public get(container: Container): TImpl[] {\r\n return container.getAll(this._key);\r\n }\r\n\r\n /**\r\n * Creates an All Resolver for the supplied key.\r\n * @param key The key to resolve all instances for.\r\n * @return Returns an instance of All for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): All {\r\n return new All(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to specify an optional dependency, which will\r\n * be resolved only if already registred with the container.\r\n */\r\n@resolver()\r\nexport class Optional = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /** @internal */\r\n public _checkParent: boolean;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'optional';\r\n\r\n /**\r\n * Creates an instance of the Optional class.\r\n * @param key The key to optionally resolve for.\r\n * @param checkParent Indicates whether or not the parent container hierarchy\r\n * should be checked.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor, checkParent: boolean = true) {\r\n this._key = key;\r\n this._checkParent = checkParent;\r\n }\r\n\r\n /**\r\n * Called by the container to provide optional resolution of the key.\r\n * @param container The container to resolve from.\r\n * @return Returns the instance if found; otherwise null.\r\n */\r\n public get(container: Container): TImpl | null {\r\n if (container.hasResolver(this._key, this._checkParent)) {\r\n return container.get(this._key);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Creates an Optional Resolver for the supplied key.\r\n * @param key The key to optionally resolve for.\r\n * @param [checkParent=true] Indicates whether or not the parent container\r\n * hierarchy should be checked.\r\n * @return Returns an instance of Optional for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n checkParent: boolean = true): Optional {\r\n return new Optional(key, checkParent);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject the dependency from the parent container instead of the current\r\n * one.\r\n */\r\n@resolver()\r\nexport class Parent = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'parent';\r\n\r\n /**\r\n * Creates an instance of the Parent class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to load the dependency from the parent container\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container): TImpl | null {\r\n return container.parent ? container.parent.get(this._key) : null;\r\n }\r\n\r\n /**\r\n * Creates a Parent Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Parent for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor\r\n ): Parent {\r\n return new Parent(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow injecting dependencies but also passing data to the constructor.\r\n */\r\n@resolver()\r\nexport class Factory = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public _key: PrimitiveOrDependencyCtorOrFunctor;\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'factory';\r\n\r\n /**\r\n * Creates an instance of the Factory class.\r\n * @param key The key to resolve from the parent container.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to pass the dependencies to the constructor.\r\n * @param container The container to invoke the constructor with dependencies\r\n * and other parameters.\r\n * @return Returns a function that can be invoked to resolve dependencies\r\n * later, and the rest of the parameters.\r\n */\r\n public get(container: Container): DependencyFunctor {\r\n let fn = this._key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === Strategy.function) {\r\n fn = resolver.state;\r\n }\r\n\r\n return (...rest) => container.invoke(fn as DependencyCtorOrFunctor, rest);\r\n }\r\n\r\n /**\r\n * Creates a Factory Resolver for the supplied key.\r\n * @param key The key to resolve.\r\n * @return Returns an instance of Factory for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: DependencyCtor\r\n ): Factory {\r\n return new Factory(key);\r\n }\r\n}\r\n\r\n/**\r\n * Used to inject a new instance of a dependency, without regard for existing\r\n * instances in the container. Instances can optionally be registered in the\r\n * container\r\n * under a different key by supplying a key using the `as` method.\r\n */\r\n@resolver()\r\nexport class NewInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args> {\r\n /** @internal */\r\n public key: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public asKey: PrimitiveOrDependencyCtorOrFunctor;\r\n /** @internal */\r\n public dynamicDependencies: TArgs[number][];\r\n\r\n /**\r\n * A non existent property to help TS distinguish resolvers\r\n *\r\n * This is semi-private, and should not be used by application\r\n */\r\n __resolver_type__!: 'newInstance';\r\n\r\n /**\r\n * Creates an instance of the NewInstance class.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n */\r\n constructor(key: PrimitiveOrDependencyCtorOrFunctor, ...dynamicDependencies: TArgs[number][]) {\r\n this.key = key;\r\n this.asKey = key;\r\n this.dynamicDependencies = dynamicDependencies;\r\n }\r\n\r\n /**\r\n * Called by the container to instantiate the dependency and potentially\r\n * register\r\n * as another key if the `as` method was used.\r\n * @param container The container to resolve the parent from.\r\n * @return Returns the matching instance from the parent container\r\n */\r\n public get(container: Container) {\r\n const dynamicDependencies =\r\n this.dynamicDependencies.length > 0\r\n ? this.dynamicDependencies.map(dependency =>\r\n dependency['protocol:aurelia:resolver']\r\n ? dependency.get(container)\r\n : container.get(dependency)\r\n )\r\n : undefined;\r\n\r\n let fn = this.key;\r\n const resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === 3) {\r\n fn = resolver.state;\r\n }\r\n\r\n const instance = container.invoke(fn as DependencyCtorOrFunctor, dynamicDependencies);\r\n container.registerInstance(this.asKey, instance);\r\n return instance;\r\n }\r\n\r\n /**\r\n * Instructs the NewInstance resolver to register the resolved instance using\r\n * the supplied key.\r\n * @param key The key to register the instance with.\r\n * @return Returns the NewInstance resolver.\r\n */\r\n public as(key: PrimitiveOrDependencyCtorOrFunctor) {\r\n this.asKey = key;\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates an NewInstance Resolver for the supplied key.\r\n * @param key The key to resolve/instantiate.\r\n * @param dynamicDependencies An optional list of dynamic dependencies.\r\n * @return Returns an instance of NewInstance for the key.\r\n */\r\n public static of = Impl,\r\n TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtorOrFunctor,\r\n ...dynamicDependencies: TArgs[number][]): NewInstance {\r\n return new NewInstance(key, ...dynamicDependencies);\r\n }\r\n}\r\n\r\n/**\r\n * Used by parameter decorators to call autoinject for the target and retrieve\r\n * the target's inject property.\r\n * @param target The target class.\r\n * @return Returns the target's own inject property.\r\n */\r\nexport function getDecoratorDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] }\r\n ) {\r\n autoinject(target);\r\n\r\n return target.inject;\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should be lazy loaded\r\n */\r\nexport function lazy<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: { new (...args: TArgs): TBase | TImpl },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Lazy.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency should load all instances of the given\r\n * key.\r\n */\r\nexport function all<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = All.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as optional\r\n */\r\nexport function optional<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n checkParentOrTarget: boolean = true) {\r\n const deco = (checkParent: boolean) => {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Optional.of(inject[index], checkParent);\r\n };\r\n };\r\n if (typeof checkParentOrTarget === 'boolean') {\r\n return deco(checkParentOrTarget);\r\n }\r\n return deco(true);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to look at the parent container for\r\n * resolution\r\n */\r\nexport function parent<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number) {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Parent.of(inject[index]);\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency to create a factory method, that can\r\n * accept optional arguments\r\n */\r\nexport function factory<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n keyValue: any\r\n ) {\r\n return (\r\n target: DependencyCtor & { inject?: TArgs[number][] },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = Factory.of(keyValue);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies the dependency as a new instance. Instances can optionally be registered in the container\r\n * under a different key and/or use dynamic dependencies\r\n */\r\nexport function newInstance<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n asKeyOrTarget?: PrimitiveOrDependencyCtor & { inject?: TArgs[number][] },\r\n ...dynamicDependencies: TArgs[number][]\r\n) {\r\n const deco = (asKey?: typeof asKeyOrTarget) => {\r\n return (\r\n target: { new (...args: any[]): any },\r\n _key,\r\n index: number\r\n ) => {\r\n const inject = getDecoratorDependencies(target)!;\r\n inject[index] = NewInstance.of(inject[index], ...dynamicDependencies);\r\n if (!!asKey) {\r\n inject[index].as(asKey);\r\n }\r\n };\r\n };\r\n if (arguments.length >= 1) {\r\n return deco(asKeyOrTarget);\r\n }\r\n return deco();\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { AggregateError } from 'aurelia-pal';\r\nimport { resolver, StrategyResolver, Resolver, Strategy, StrategyState, Factory, NewInstance, Lazy, Optional, All, Parent } from './resolvers';\r\nimport { Invoker } from './invokers';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n DependencyCtor,\r\n PrimitiveOrDependencyCtor,\r\n PrimitiveOrDependencyCtorOrFunctor,\r\n ImplOrAny,\r\n Impl,\r\n Args,\r\n Primitive\r\n} from './types';\r\n\r\nlet currentContainer: Container | null = null;\r\n\r\nfunction validateKey(key: any) {\r\n if (key === null || key === undefined) {\r\n throw new Error(\r\n 'key/value cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport const _emptyParameters = Object.freeze([]) as [];\r\n\r\nmetadata.registration = 'aurelia:registration';\r\nmetadata.invoker = 'aurelia:invoker';\r\n\r\nconst resolverDecorates = resolver.decorates!;\r\n\r\n/**\r\n * Stores the information needed to invoke a function.\r\n */\r\nexport class InvocationHandler<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args\r\n > {\r\n /**\r\n * The function to be invoked by this handler.\r\n */\r\n public fn: DependencyCtorOrFunctor;\r\n\r\n /**\r\n * The invoker implementation that will be used to actually invoke the function.\r\n */\r\n public invoker: Invoker;\r\n\r\n /**\r\n * The statically known dependencies of this function invocation.\r\n */\r\n public dependencies: TArgs;\r\n\r\n /**\r\n * Instantiates an InvocationDescription.\r\n * @param fn The Function described by this description object.\r\n * @param invoker The strategy for invoking the function.\r\n * @param dependencies The static dependencies of the function call.\r\n */\r\n constructor(\r\n fn: DependencyCtorOrFunctor,\r\n invoker: Invoker,\r\n dependencies: TArgs\r\n ) {\r\n this.fn = fn;\r\n this.invoker = invoker;\r\n this.dependencies = dependencies;\r\n }\r\n\r\n /**\r\n * Invokes the function.\r\n * @param container The calling container.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(container: Container, dynamicDependencies?: TArgs[]): TImpl {\r\n const previousContainer = currentContainer;\r\n currentContainer = container;\r\n try {\r\n return dynamicDependencies !== undefined\r\n ? this.invoker.invokeWithDynamicDependencies(\r\n container,\r\n this.fn,\r\n this.dependencies,\r\n dynamicDependencies\r\n )\r\n : this.invoker.invoke(container, this.fn, this.dependencies);\r\n } finally {\r\n currentContainer = previousContainer;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Used to configure a Container instance.\r\n */\r\nexport interface ContainerConfiguration {\r\n /**\r\n * An optional callback which will be called when any function needs an\r\n * InvocationHandler created (called once per Function).\r\n */\r\n onHandlerCreated?: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n handlers?: Map;\r\n}\r\n\r\nfunction invokeWithDynamicDependencies<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n>(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n) {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n let lookup;\r\n\r\n while (i--) {\r\n lookup = staticDependencies[i];\r\n\r\n if (lookup === null || lookup === undefined) {\r\n throw new Error(\r\n 'Constructor Parameter with index ' +\r\n i +\r\n ' cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?'\r\n );\r\n } else {\r\n args[i] = container.get(lookup);\r\n }\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return Reflect.construct(fn, args);\r\n}\r\n\r\nconst classInvoker: Invoker = {\r\n invoke(container, Type: DependencyCtor, deps) {\r\n const instances = deps.map((dep) => container.get(dep));\r\n return Reflect.construct(Type, instances);\r\n },\r\n invokeWithDynamicDependencies\r\n};\r\n\r\nfunction getDependencies(f) {\r\n if (!f.hasOwnProperty('inject')) {\r\n return [];\r\n }\r\n\r\n if (typeof f.inject === 'function') {\r\n return f.inject();\r\n }\r\n\r\n return f.inject;\r\n}\r\n\r\n/**\r\n * A lightweight, extensible dependency injection container.\r\n */\r\nexport class Container {\r\n /**\r\n * The global root Container instance. Available if makeGlobal() has been\r\n * called. Aurelia Framework calls makeGlobal().\r\n */\r\n public static instance: Container;\r\n\r\n /**\r\n * The parent container in the DI hierarchy.\r\n */\r\n public parent: Container | null;\r\n\r\n /**\r\n * The root container in the DI hierarchy.\r\n */\r\n public root: Container;\r\n\r\n /** @internal */\r\n public _configuration: ContainerConfiguration;\r\n\r\n /** @internal */\r\n public _onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler;\r\n\r\n /** @internal */\r\n public _handlers: Map;\r\n\r\n /** @internal */\r\n public _resolvers: Map;\r\n\r\n /**\r\n * Creates an instance of Container.\r\n * @param configuration Provides some configuration for the new Container instance.\r\n */\r\n constructor(configuration?: ContainerConfiguration) {\r\n if (configuration === undefined) {\r\n configuration = {};\r\n }\r\n\r\n this._configuration = configuration;\r\n this._onHandlerCreated = configuration.onHandlerCreated!;\r\n this._handlers =\r\n configuration.handlers || (configuration.handlers = new Map());\r\n this._resolvers = new Map();\r\n this.root = this;\r\n this.parent = null;\r\n }\r\n\r\n /**\r\n * Makes this container instance globally reachable through Container.instance.\r\n */\r\n public makeGlobal(): Container {\r\n Container.instance = this;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets an invocation handler creation callback that will be called when new\r\n * InvocationsHandlers are created (called once per Function).\r\n * @param onHandlerCreated The callback to be called when an\r\n * InvocationsHandler is created.\r\n */\r\n public setHandlerCreatedCallback<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args>(\r\n onHandlerCreated: (\r\n handler: InvocationHandler\r\n ) => InvocationHandler\r\n ) {\r\n this._onHandlerCreated = onHandlerCreated;\r\n this._configuration.onHandlerCreated = onHandlerCreated;\r\n }\r\n\r\n /**\r\n * Registers an existing object instance with the container.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param instance The instance that will be resolved when the key is matched.\r\n * This defaults to the key value when instance is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerInstance = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n instance?: TImpl): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(0, instance === undefined ? key : instance)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container always\r\n * returns the same instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerSingleton = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.singleton, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) such that the container returns a\r\n * new instance for each request.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n * @return The resolver that was registered.\r\n */\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public registerTransient = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(2, fn === undefined ? key as DependencyCtor : fn)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param handler The resolution function to use when the dependency is\r\n * needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerHandler = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n handler: (container?: Container, key?: PrimitiveOrDependencyCtor, resolver?: Resolver) => any\r\n ): Resolver {\r\n return this.registerResolver(\r\n key,\r\n new StrategyResolver(Strategy.function, handler)\r\n );\r\n }\r\n\r\n /**\r\n * Registers an additional key that serves as an alias to the original DI key.\r\n * @param originalKey The key that originally identified the dependency; usually a constructor function.\r\n * @param aliasKey An alternate key which can also be used to resolve the same dependency as the original.\r\n * @return The resolver that was registered.\r\n */\r\n public registerAlias = Impl, TArgs extends Args = Args>(\r\n originalKey: PrimitiveOrDependencyCtor,\r\n aliasKey: PrimitiveOrDependencyCtor): Resolver {\r\n return this.registerResolver(\r\n aliasKey,\r\n new StrategyResolver(5, originalKey)\r\n );\r\n }\r\n\r\n /**\r\n * Registers a custom resolution function such that the container calls this\r\n * function for each request to obtain the instance.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param resolver The resolver to use when the dependency is needed.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor,\r\n resolver: Resolver\r\n ): Resolver {\r\n validateKey(key);\r\n\r\n const allResolvers = this._resolvers;\r\n const result = allResolvers.get(key);\r\n\r\n if (result === undefined) {\r\n allResolvers.set(key, resolver);\r\n } else if (result.strategy === 4) {\r\n result.state.push(resolver);\r\n } else {\r\n allResolvers.set(key, new StrategyResolver(4, [result, resolver]));\r\n }\r\n\r\n return resolver;\r\n }\r\n\r\n /**\r\n * Registers a type (constructor function) by inspecting its registration\r\n * annotations. If none are found, then the default singleton registration is\r\n * used.\r\n * @param key The key that identifies the dependency at resolution time;\r\n * usually a constructor function.\r\n * @param fn The constructor function to use when the dependency needs to be\r\n * instantiated. This defaults to the key value when fn is not supplied.\r\n */\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: Primitive, fn: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: DependencyCtor, fn?: DependencyCtorOrFunctor): Resolver;\r\n public autoRegister = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, fn?: DependencyCtorOrFunctor): Resolver {\r\n fn = fn === undefined ? key as DependencyCtor : fn;\r\n\r\n if (typeof fn === 'function') {\r\n const registration = metadata.get(metadata.registration, fn);\r\n\r\n if (registration === undefined) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn));\r\n }\r\n\r\n return registration.registerResolver(this, key, fn);\r\n }\r\n\r\n return this.registerResolver(key, new StrategyResolver(0, fn));\r\n }\r\n\r\n /**\r\n * Registers an array of types (constructor functions) by inspecting their\r\n * registration annotations. If none are found, then the default singleton\r\n * registration is used.\r\n * @param fns The constructor function to use when the dependency needs to be instantiated.\r\n */\r\n public autoRegisterAll(fns: DependencyCtor[]): void {\r\n let i = fns.length;\r\n while (i--) {\r\n this.autoRegister(fns[i]);\r\n }\r\n }\r\n\r\n /**\r\n * Unregisters based on key.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n */\r\n public unregister(key: any): void {\r\n this._resolvers.delete(key);\r\n }\r\n\r\n /**\r\n * Inspects the container to determine if a particular key has been registred.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @param checkParent Indicates whether or not to check the parent container hierarchy.\r\n * @return Returns true if the key has been registred; false otherwise.\r\n */\r\n public hasResolver = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor, checkParent: boolean = false): boolean {\r\n validateKey(key);\r\n\r\n return (\r\n this._resolvers.has(key) ||\r\n (checkParent &&\r\n this.parent !== null &&\r\n this.parent.hasResolver(key, checkParent))\r\n );\r\n }\r\n\r\n /**\r\n * Gets the resolver for the particular key, if it has been registered.\r\n * @param key The key that identifies the dependency at resolution time; usually a constructor function.\r\n * @return Returns the resolver, if registred, otherwise undefined.\r\n */\r\n public getResolver<\r\n TStrategyKey extends keyof StrategyState,\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n >(\r\n key: PrimitiveOrDependencyCtorOrFunctor\r\n ): StrategyResolver {\r\n return this._resolvers.get(key);\r\n }\r\n\r\n /**\r\n * Resolves a single instance based on the provided key.\r\n * @param key The key that identifies the object to resolve.\r\n * @return Returns the resolved instance.\r\n */\r\n public get | Lazy | Factory | Optional | Parent | All>(\r\n key: TResolver): ResolvedValue;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: typeof Container): Container;\r\n public get = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor | typeof Container): ImplOrAny | Container {\r\n validateKey(key);\r\n\r\n if (key === Container) {\r\n return this;\r\n }\r\n\r\n if (resolverDecorates(key)) {\r\n return key.get(this, key);\r\n }\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key as DependencyCtor).get(this, key);\r\n }\r\n\r\n const registration = metadata.get(metadata.registration, key);\r\n\r\n if (registration === undefined) {\r\n return this.parent._get(key);\r\n }\r\n\r\n return registration.registerResolver(\r\n this, key, key as DependencyCtorOrFunctor).get(this, key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n public _get(key) {\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n\r\n return this.parent._get(key);\r\n }\r\n\r\n return resolver.get(this, key);\r\n }\r\n\r\n /**\r\n * Resolves all instance registered under the provided key.\r\n * @param key The key that identifies the objects to resolve.\r\n * @return Returns an array of the resolved instances.\r\n */\r\n public getAll = Impl, TArgs extends Args = Args>(\r\n key: PrimitiveOrDependencyCtor): ImplOrAny[] {\r\n validateKey(key);\r\n\r\n const resolver = this._resolvers.get(key);\r\n\r\n if (resolver === undefined) {\r\n if (this.parent === null) {\r\n return _emptyParameters;\r\n }\r\n\r\n return this.parent.getAll(key);\r\n }\r\n\r\n if (resolver.strategy === 4) {\r\n const state = resolver.state;\r\n let i = state.length;\r\n const results = new Array(i);\r\n\r\n while (i--) {\r\n results[i] = state[i].get(this, key);\r\n }\r\n\r\n return results;\r\n }\r\n\r\n return [resolver.get(this, key)];\r\n }\r\n\r\n /**\r\n * Creates a new dependency injection container whose parent is the current container.\r\n * @return Returns a new container instance parented to this.\r\n */\r\n public createChild(): Container {\r\n const child = new Container(this._configuration);\r\n child.root = this.root;\r\n child.parent = this;\r\n return child;\r\n }\r\n\r\n /**\r\n * Invokes a function, recursively resolving its dependencies.\r\n * @param fn The function to invoke with the auto-resolved dependencies.\r\n * @param dynamicDependencies Additional function dependencies to use during invocation.\r\n * @return Returns the instance resulting from calling the function.\r\n */\r\n public invoke = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor,\r\n dynamicDependencies?: TArgs[number][]\r\n ): ImplOrAny {\r\n try {\r\n let handler = this._handlers.get(fn);\r\n\r\n if (handler === undefined) {\r\n handler = this._createInvocationHandler(fn);\r\n this._handlers.set(fn, handler);\r\n }\r\n\r\n return handler.invoke(this, dynamicDependencies);\r\n } catch (e) {\r\n // @ts-expect-error AggregateError returns an Error in its type hence it fails (new ...) but it's fine\r\n throw new AggregateError(\r\n `Error invoking ${fn.name}. Check the inner error for details.`,\r\n e as Error | undefined,\r\n true\r\n );\r\n }\r\n }\r\n\r\n public _createInvocationHandler\r\n = Impl, TArgs extends Args = Args>(\r\n fn: DependencyCtorOrFunctor & { inject?: any; }\r\n ): InvocationHandler {\r\n let dependencies;\r\n\r\n if (fn.inject === undefined) {\r\n dependencies =\r\n metadata.getOwn(metadata.paramTypes, fn) || _emptyParameters;\r\n } else {\r\n dependencies = [];\r\n let ctor = fn;\r\n while (typeof ctor === 'function') {\r\n dependencies.push(...getDependencies(ctor));\r\n ctor = Object.getPrototypeOf(ctor);\r\n }\r\n }\r\n\r\n const invoker = metadata.getOwn(metadata.invoker, fn) || classInvoker;\r\n\r\n const handler = new InvocationHandler(fn, invoker, dependencies);\r\n return this._onHandlerCreated !== undefined\r\n ? this._onHandlerCreated(handler)\r\n : handler;\r\n }\r\n}\r\n\r\nexport type ResolvedValue =\r\n T extends (new (...args: any[]) => infer R)\r\n ? R\r\n : T extends (abstract new (...args: any[]) => infer R)\r\n ? R\r\n : T extends Factory\r\n ? (...args: unknown[]) => R\r\n : T extends Lazy\r\n ? () => R\r\n : T extends NewInstance\r\n ? R\r\n : T extends Optional\r\n ? R | null\r\n : T extends All\r\n ? R[]\r\n : T extends Parent\r\n ? R | null\r\n : T extends [infer T1, ...infer T2]\r\n ? [ResolvedValue, ...ResolvedValue]\r\n : T;\r\n\r\n/**\r\n * Resolve a key, or list of keys based on the current container.\r\n * \r\n * @example\r\n * ```ts\r\n * import { resolve } from 'aurelia-framework';\r\n * // or\r\n * // import { Container, resolve } from 'aurelia-dependency-injection';\r\n * \r\n * class MyCustomElement {\r\n * someService = resolve(MyService);\r\n * }\r\n * ```\r\n */\r\nexport function resolve(key: K): ResolvedValue;\r\nexport function resolve(...keys: K): ResolvedValue\r\nexport function resolve(...keys: K) {\r\n if (currentContainer == null) {\r\n throw new Error(`There is not a currently active container to resolve \"${String(keys)}\". Are you trying to \"new SomeClass(...)\" that has a resolve(...) call?`);\r\n }\r\n \r\n return keys.length === 1\r\n ? currentContainer.get(keys[0])\r\n : keys.map(containerGetKey, currentContainer);\r\n}\r\n\r\nfunction containerGetKey(this: Container, key: any) {\r\n return this.get(key);\r\n}\r\n","import './internal';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport { Container } from './container';\r\nimport { DependencyCtorOrFunctor, ImplOrAny, Impl, Args, DependencyCtor, DependencyFunctor } from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom Invoker for the decorated item.\r\n */\r\nexport function invoker, TArgs extends Args>(\r\n value: Invoker\r\n): (target: DependencyCtor) => void {\r\n return target => {\r\n metadata.define(metadata.invoker, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies that the decorated item should be called as a factory\r\n * function, rather than a constructor.\r\n */\r\nexport function invokeAsFactory, TArgs extends Args>(\r\n potentialTarget?: DependencyCtor\r\n): void | ((target: DependencyCtor) => void) {\r\n const deco = (target: DependencyCtor) => {\r\n metadata.define(metadata.invoker, FactoryInvoker.instance, target);\r\n };\r\n\r\n return potentialTarget ? deco(potentialTarget) : deco;\r\n}\r\n\r\n/**\r\n * A strategy for invoking a function, resulting in an object instance.\r\n */\r\nexport interface Invoker, TArgs extends Args> {\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during\r\n * invocation.\r\n * @return The result of the function invocation.\r\n */\r\n invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny;\r\n}\r\n\r\n/**\r\n * An Invoker that is used to invoke a factory method.\r\n */\r\nexport class FactoryInvoker<\r\n TBase,\r\n TImpl extends Impl = Impl,\r\n TArgs extends Args = Args\r\n > implements Invoker {\r\n /**\r\n * The singleton instance of the FactoryInvoker.\r\n */\r\n public static instance: FactoryInvoker;\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param dependencies The dependencies of the function call.\r\n * @return The result of the function invocation.\r\n */\r\n public invoke(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n dependencies: TArgs\r\n ): ImplOrAny {\r\n let i = dependencies.length;\r\n const args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(dependencies[i]);\r\n }\r\n\r\n return ((fn as DependencyFunctor).apply(undefined, args as TArgs)) as ImplOrAny;\r\n }\r\n\r\n /**\r\n * Invokes the function with the provided dependencies.\r\n * @param container The calling container.\r\n * @param fn The constructor or factory function.\r\n * @param staticDependencies The static dependencies of the function.\r\n * @param dynamicDependencies Additional dependencies to use during invocation.\r\n * @return The result of the function invocation.\r\n */\r\n public invokeWithDynamicDependencies(\r\n container: Container,\r\n fn: DependencyCtorOrFunctor,\r\n staticDependencies: TArgs[number][],\r\n dynamicDependencies: TArgs[number][]\r\n ): ImplOrAny {\r\n let i = staticDependencies.length;\r\n let args = new Array(i);\r\n\r\n while (i--) {\r\n args[i] = container.get(staticDependencies[i]);\r\n }\r\n\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n\r\n return (fn as DependencyFunctor).apply(undefined, args as TArgs) as ImplOrAny;\r\n }\r\n}\r\n\r\nFactoryInvoker.instance = new FactoryInvoker();\r\n","import './internal';\r\nimport { Resolver } from './resolvers';\r\nimport { Container } from './container';\r\nimport { metadata } from 'aurelia-metadata';\r\nimport {\r\n DependencyCtorOrFunctor,\r\n PrimitiveOrDependencyCtor,\r\n Impl,\r\n Args,\r\n DependencyCtor\r\n} from './types';\r\n\r\n/**\r\n * Decorator: Specifies a custom registration strategy for the decorated\r\n * class/function.\r\n */\r\nexport function registration, TArgs extends Args>(\r\n value: Registration) {\r\n return (target: DependencyCtor) => {\r\n metadata.define(metadata.registration, value, target);\r\n };\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"transient\"\r\n * lifetime.\r\n */\r\nexport function transient, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor) {\r\n return registration(new TransientRegistration(key));\r\n}\r\n\r\n/**\r\n * Decorator: Specifies to register the decorated item with a \"singleton\"\r\n * lifetime.\r\n */\r\nexport function singleton(registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n key?: PrimitiveOrDependencyCtor, registerInChild?: boolean);\r\nexport function singleton, TArgs extends Args>(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean, registerInChild: boolean = false) {\r\n return registration(\r\n new SingletonRegistration(keyOrRegisterInChild, registerInChild)\r\n );\r\n}\r\n\r\n/**\r\n * Customizes how a particular function is resolved by the Container.\r\n */\r\nexport interface Registration<\r\n TBase,\r\n TImpl extends Impl,\r\n TArgs extends Args> {\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver;\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * transients with the container.\r\n */\r\nexport class TransientRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of TransientRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(key?: PrimitiveOrDependencyCtor) {\r\n this._key = key;\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const existingResolver = container.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? container.registerTransient(\r\n (this._key || key) as string,\r\n fn as DependencyCtorOrFunctor)\r\n : existingResolver;\r\n }\r\n}\r\n\r\n/**\r\n * Used to allow functions/classes to indicate that they should be registered as\r\n * singletons with the container.\r\n */\r\nexport class SingletonRegistration, TArgs extends Args>\r\n implements Registration {\r\n /** @internal */\r\n public _registerInChild: boolean;\r\n\r\n /** @internal */\r\n public _key?: PrimitiveOrDependencyCtor;\r\n\r\n /**\r\n * Creates an instance of SingletonRegistration.\r\n * @param key The key to register as.\r\n */\r\n constructor(\r\n keyOrRegisterInChild?: PrimitiveOrDependencyCtor | boolean,\r\n registerInChild: boolean = false) {\r\n if (typeof keyOrRegisterInChild === 'boolean') {\r\n this._registerInChild = keyOrRegisterInChild;\r\n } else {\r\n this._key = keyOrRegisterInChild;\r\n this._registerInChild = registerInChild;\r\n }\r\n }\r\n\r\n /**\r\n * Called by the container to register the resolver.\r\n * @param container The container the resolver is being registered with.\r\n * @param key The key the resolver should be registered as.\r\n * @param fn The function to create the resolver for.\r\n * @return The resolver that was registered.\r\n */\r\n public registerResolver(\r\n container: Container,\r\n key: PrimitiveOrDependencyCtor,\r\n fn: DependencyCtorOrFunctor\r\n ): Resolver {\r\n const targetContainer = this._registerInChild ? container : container.root;\r\n const existingResolver = targetContainer.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? targetContainer.registerSingleton(this._key || key, fn)\r\n : existingResolver;\r\n }\r\n}\r\n"],"names":["metadata","protocol","Strategy","AggregateError"],"mappings":";;;;;;IAAA;IACA;AACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AACA;AAsCA;IACO,SAAS,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;IAC1D,IAAI,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;IACjI,IAAI,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IACnI,SAAS,KAAK,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,C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AA,gBAAgB,GAAvB,UACE,SAAoB,EACpB,GAAmD,EACnD,EAAgD,EAAA;IAEhD,QAAA,IAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC;IAC3E,QAAA,IAAM,gBAAgB,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC;YACvE,OAAO,gBAAgB,KAAK,SAAS;IACnC,cAAE,eAAe,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,EAAE,EAAE,CAAC;kBACvD,gBAAgB,CAAC;SACtB,CAAA;QACH,OAAC,qBAAA,CAAA;IAAD,CAAC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index 8245798..c481fb3 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,14 +1,21 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. - -## [1.6.0](https://github.com/aurelia/dependency-injection/compare/1.5.2...1.6.0) (2024-08-11) - - -### Features - -* backport resolve ([#228](https://github.com/aurelia/dependency-injection/issues/228)) ([ccac164](https://github.com/aurelia/dependency-injection/commit/ccac164c511274a5b37db441cdfea924c92b37fd)) - +# Changelog + +All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. + +## [1.6.1](https://github.com/aurelia/dependency-injection/compare/1.6.0...1.6.1) (2024-08-27) + + +### Bug Fixes + +* correctly infer type from abstract classes ([230e7bd](https://github.com/aurelia/dependency-injection/commit/230e7bd42f6d2e15dd94627620eb0c09402b90cc)) + +## [1.6.0](https://github.com/aurelia/dependency-injection/compare/1.5.2...1.6.0) (2024-08-11) + + +### Features + +* backport resolve ([#228](https://github.com/aurelia/dependency-injection/issues/228)) ([ccac164](https://github.com/aurelia/dependency-injection/commit/ccac164c511274a5b37db441cdfea924c92b37fd)) + ## [1.5.2](https://github.com/aurelia/dependency-injection/compare/1.5.1...1.5.2) (2019-11-20) diff --git a/doc/api.json b/doc/api.json index 4b47609..c3e2df6 100644 --- a/doc/api.json +++ b/doc/api.json @@ -1 +1 @@ -{"id":0,"name":"aurelia-dependency-injection","variant":"project","kind":1,"flags":{},"children":[{"id":446,"name":"Strategy","variant":"declaration","kind":8,"flags":{},"children":[{"id":452,"name":"alias","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"resolvers.ts","line":51,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L51"}],"type":{"type":"literal","value":5}},{"id":451,"name":"array","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"resolvers.ts","line":50,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L50"}],"type":{"type":"literal","value":4}},{"id":450,"name":"function","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"resolvers.ts","line":49,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L49"}],"type":{"type":"literal","value":3}},{"id":447,"name":"instance","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"resolvers.ts","line":46,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L46"}],"type":{"type":"literal","value":0}},{"id":448,"name":"singleton","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"resolvers.ts","line":47,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L47"}],"type":{"type":"literal","value":1}},{"id":449,"name":"transient","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"resolvers.ts","line":48,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L48"}],"type":{"type":"literal","value":2}}],"groups":[{"title":"Enumeration Members","children":[452,451,450,447,448,449]}],"sources":[{"fileName":"resolvers.ts","line":45,"character":12,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L45"}]},{"id":521,"name":"All","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to allow functions/classes to specify resolution of all matches to a key."}]},"children":[{"id":528,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"resolvers.ts","line":227,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L227"}],"signatures":[{"id":529,"name":"new All","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an instance of the All class."}]},"sources":[{"fileName":"resolvers.ts","line":227,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L227"}],"typeParameters":[{"id":530,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":531,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":530,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"All.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":532,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":530,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"All.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":533,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to lazily resolve all matches for."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":530,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"All.TBase","refersToTypeParameter":true},{"type":"reference","target":531,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"All.TImpl","refersToTypeParameter":true},{"type":"reference","target":532,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"All.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":521,"typeArguments":[{"type":"reference","target":530,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"All.TBase","refersToTypeParameter":true},{"type":"reference","target":531,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"All.TImpl","refersToTypeParameter":true},{"type":"reference","target":532,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"All.TArgs","refersToTypeParameter":true}],"name":"All","package":"aurelia-dependency-injection"}}]},{"id":535,"name":"__resolver_type__","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"A non existent property to help TS distinguish resolvers\r\n\r\nThis is semi-private, and should not be used by application"}]},"sources":[{"fileName":"resolvers.ts","line":221,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L221"}],"type":{"type":"literal","value":"all"}},{"id":536,"name":"get","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"resolvers.ts","line":237,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L237"}],"signatures":[{"id":537,"name":"get","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to resolve all matching dependencies as an array of\r\ninstances."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns an array of all matching instances."}]}]},"sources":[{"fileName":"resolvers.ts","line":237,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L237"}],"parameters":[{"id":538,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container to resolve from."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}],"type":{"type":"array","elementType":{"type":"reference","target":531,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"All.TImpl","refersToTypeParameter":true}}}]},{"id":522,"name":"of","variant":"declaration","kind":2048,"flags":{"isPublic":true,"isStatic":true},"sources":[{"fileName":"resolvers.ts","line":246,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L246"}],"signatures":[{"id":523,"name":"of","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an All Resolver for the supplied key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns an instance of All for the key."}]}]},"sources":[{"fileName":"resolvers.ts","line":246,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L246"}],"typeParameters":[{"id":524,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":525,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":524,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":526,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":524,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":527,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to resolve all instances for."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":524,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":525,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":526,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":521,"typeArguments":[{"type":"reference","target":524,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":525,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":526,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"All","package":"aurelia-dependency-injection"}}]}],"groups":[{"title":"Constructors","children":[528]},{"title":"Properties","children":[535]},{"title":"Methods","children":[536,522]}],"sources":[{"fileName":"resolvers.ts","line":210,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L210"}],"typeParameters":[{"id":539,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":540,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":530,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"All.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":530,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"All.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":541,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":530,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"All.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":530,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"All.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}]},{"id":34,"name":"Container","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"A lightweight, extensible dependency injection container."}]},"children":[{"id":36,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"container.ts","line":206,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L206"}],"signatures":[{"id":37,"name":"new Container","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an instance of Container."}]},"sources":[{"fileName":"container.ts","line":206,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L206"}],"parameters":[{"id":38,"name":"configuration","variant":"param","kind":32768,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Provides some configuration for the new Container instance."}]},"type":{"type":"reference","target":28,"name":"ContainerConfiguration","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}]},{"id":39,"name":"parent","variant":"declaration","kind":1024,"flags":{"isPublic":true},"comment":{"summary":[{"kind":"text","text":"The parent container in the DI hierarchy."}]},"sources":[{"fileName":"container.ts","line":181,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L181"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}]}},{"id":40,"name":"root","variant":"declaration","kind":1024,"flags":{"isPublic":true},"comment":{"summary":[{"kind":"text","text":"The root container in the DI hierarchy."}]},"sources":[{"fileName":"container.ts","line":186,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L186"}],"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":35,"name":"instance","variant":"declaration","kind":1024,"flags":{"isPublic":true,"isStatic":true},"comment":{"summary":[{"kind":"text","text":"The global root Container instance. Available if makeGlobal() has been\r\ncalled. Aurelia Framework calls makeGlobal()."}]},"sources":[{"fileName":"container.ts","line":176,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L176"}],"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":184,"name":"_createInvocationHandler","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":583,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L583"}],"signatures":[{"id":185,"name":"_createInvocationHandler","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":583,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L583"}],"typeParameters":[{"id":186,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":187,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":186,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":188,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":186,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":189,"name":"fn","variant":"param","kind":32768,"flags":{},"type":{"type":"intersection","types":[{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":186,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":187,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":188,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"},{"type":"reflection","declaration":{"id":190,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":191,"name":"inject","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"container.ts","line":585,"character":59,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L585"}],"type":{"type":"intrinsic","name":"any"}}],"groups":[{"title":"Properties","children":[191]}],"sources":[{"fileName":"container.ts","line":585,"character":57,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L585"}]}}]}}],"type":{"type":"reference","target":9,"typeArguments":[{"type":"reference","target":186,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":187,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":188,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"InvocationHandler","package":"aurelia-dependency-injection"}}]},{"id":166,"name":"_get","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":495,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L495"}],"signatures":[{"id":167,"name":"_get","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":495,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L495"}],"parameters":[{"id":168,"name":"key","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"any"}}]},{"id":118,"name":"autoRegister","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":376,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L376"},{"fileName":"container.ts","line":378,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L378"},{"fileName":"container.ts","line":380,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L380"}],"signatures":[{"id":119,"name":"autoRegister","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Registers a type (constructor function) by inspecting its registration\r\nannotations. If none are found, then the default singleton registration is\r\nused."}]},"sources":[{"fileName":"container.ts","line":376,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L376"}],"typeParameters":[{"id":120,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":121,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":120,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":122,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":120,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":123,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the dependency at resolution time;\r\nusually a constructor function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Primitive"},"name":"Primitive","package":"aurelia-dependency-injection"}},{"id":124,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The constructor function to use when the dependency needs to be\r\ninstantiated. This defaults to the key value when fn is not supplied."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":120,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":121,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":122,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":441,"name":"Resolver","package":"aurelia-dependency-injection"}},{"id":125,"name":"autoRegister","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":378,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L378"}],"typeParameters":[{"id":126,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":127,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":126,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":128,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":126,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":129,"name":"key","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":126,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":127,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":128,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"}},{"id":130,"name":"fn","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":126,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":127,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":128,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":441,"name":"Resolver","package":"aurelia-dependency-injection"}}]},{"id":131,"name":"autoRegisterAll","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":403,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L403"}],"signatures":[{"id":132,"name":"autoRegisterAll","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Registers an array of types (constructor functions) by inspecting their\r\nregistration annotations. If none are found, then the default singleton\r\nregistration is used."}]},"sources":[{"fileName":"container.ts","line":403,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L403"}],"parameters":[{"id":133,"name":"fns","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The constructor function to use when the dependency needs to be instantiated."}]},"type":{"type":"array","elementType":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"}],"name":"DependencyCtor","package":"aurelia-dependency-injection"}}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":175,"name":"createChild","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":547,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L547"}],"signatures":[{"id":176,"name":"createChild","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new dependency injection container whose parent is the current container."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns a new container instance parented to this."}]}]},"sources":[{"fileName":"container.ts","line":547,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L547"}],"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}]},{"id":151,"name":"get","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":457,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L457"},{"fileName":"container.ts","line":459,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L459"},{"fileName":"container.ts","line":461,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L461"},{"fileName":"container.ts","line":463,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L463"}],"signatures":[{"id":152,"name":"get","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Resolves a single instance based on the provided key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns the resolved instance."}]}]},"sources":[{"fileName":"container.ts","line":457,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L457"}],"typeParameters":[{"id":153,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":154,"name":"TResolver","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":608,"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}],"name":"NewInstance","package":"aurelia-dependency-injection"},{"type":"reference","target":498,"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}],"name":"Lazy","package":"aurelia-dependency-injection"},{"type":"reference","target":587,"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}],"name":"Factory","package":"aurelia-dependency-injection"},{"type":"reference","target":542,"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}],"name":"Optional","package":"aurelia-dependency-injection"},{"type":"reference","target":566,"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}],"name":"Parent","package":"aurelia-dependency-injection"},{"type":"reference","target":521,"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}],"name":"All","package":"aurelia-dependency-injection"}]}}],"parameters":[{"id":155,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the object to resolve."}]},"type":{"type":"reference","target":154,"name":"TResolver","package":"aurelia-dependency-injection","refersToTypeParameter":true}}],"type":{"type":"reference","target":192,"typeArguments":[{"type":"reference","target":154,"name":"TResolver","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"ResolvedValue","package":"aurelia-dependency-injection"}},{"id":156,"name":"get","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":459,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L459"}],"typeParameters":[{"id":157,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":158,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":157,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":159,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":157,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":160,"name":"key","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":157,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":158,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":159,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"ImplOrAny"},"typeArguments":[{"type":"reference","target":158,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"ImplOrAny","package":"aurelia-dependency-injection"}},{"id":161,"name":"get","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":461,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L461"}],"typeParameters":[{"id":162,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":163,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":162,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":164,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":162,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":165,"name":"key","variant":"param","kind":32768,"flags":{},"type":{"type":"query","queryType":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}}],"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}]},{"id":169,"name":"getAll","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":514,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L514"}],"signatures":[{"id":170,"name":"getAll","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Resolves all instance registered under the provided key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns an array of the resolved instances."}]}]},"sources":[{"fileName":"container.ts","line":514,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L514"}],"typeParameters":[{"id":171,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":172,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":171,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":173,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":171,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":174,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the objects to resolve."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":171,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":172,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":173,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"array","elementType":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"ImplOrAny"},"typeArguments":[{"type":"reference","target":172,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"ImplOrAny","package":"aurelia-dependency-injection"}}}]},{"id":144,"name":"getResolver","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":441,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L441"}],"signatures":[{"id":145,"name":"getResolver","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the resolver for the particular key, if it has been registered."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns the resolver, if registred, otherwise undefined."}]}]},"sources":[{"fileName":"container.ts","line":441,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L441"}],"typeParameters":[{"id":146,"name":"TStrategyKey","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","target":463,"typeArguments":[{"type":"reference","target":147,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":148,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":149,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"StrategyState","package":"aurelia-dependency-injection"}}},{"id":147,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":148,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":147,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":149,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":147,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":150,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the dependency at resolution time; usually a constructor function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":147,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":148,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":149,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":479,"typeArguments":[{"type":"reference","target":147,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":148,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":149,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":146,"name":"TStrategyKey","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"StrategyResolver","package":"aurelia-dependency-injection"}}]},{"id":137,"name":"hasResolver","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":424,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L424"}],"signatures":[{"id":138,"name":"hasResolver","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Inspects the container to determine if a particular key has been registred."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns true if the key has been registred; false otherwise."}]}]},"sources":[{"fileName":"container.ts","line":424,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L424"}],"typeParameters":[{"id":139,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":140,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":139,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":141,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":139,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":142,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the dependency at resolution time; usually a constructor function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":139,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":140,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":141,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":143,"name":"checkParent","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Indicates whether or not to check the parent container hierarchy."}]},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"intrinsic","name":"boolean"}}]},{"id":177,"name":"invoke","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":560,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L560"}],"signatures":[{"id":178,"name":"invoke","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Invokes a function, recursively resolving its dependencies."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns the instance resulting from calling the function."}]}]},"sources":[{"fileName":"container.ts","line":560,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L560"}],"typeParameters":[{"id":179,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":180,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":179,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":181,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":179,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":182,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The function to invoke with the auto-resolved dependencies."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":179,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":180,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":181,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":183,"name":"dynamicDependencies","variant":"param","kind":32768,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Additional function dependencies to use during invocation."}]},"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":181,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"ImplOrAny"},"typeArguments":[{"type":"reference","target":180,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"ImplOrAny","package":"aurelia-dependency-injection"}}]},{"id":48,"name":"makeGlobal","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":223,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L223"}],"signatures":[{"id":49,"name":"makeGlobal","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Makes this container instance globally reachable through Container.instance."}]},"sources":[{"fileName":"container.ts","line":223,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L223"}],"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}]},{"id":104,"name":"registerAlias","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":330,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L330"}],"signatures":[{"id":105,"name":"registerAlias","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Registers an additional key that serves as an alias to the original DI key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The resolver that was registered."}]}]},"sources":[{"fileName":"container.ts","line":330,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L330"}],"typeParameters":[{"id":106,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":107,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":106,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":108,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":106,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":109,"name":"originalKey","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that originally identified the dependency; usually a constructor function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":106,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":107,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":108,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":110,"name":"aliasKey","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"An alternate key which can also be used to resolve the same dependency as the original."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":106,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":107,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":108,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":441,"name":"Resolver","package":"aurelia-dependency-injection"}}]},{"id":92,"name":"registerHandler","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":314,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L314"}],"signatures":[{"id":93,"name":"registerHandler","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Registers a custom resolution function such that the container calls this\r\nfunction for each request to obtain the instance."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The resolver that was registered."}]}]},"sources":[{"fileName":"container.ts","line":314,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L314"}],"typeParameters":[{"id":94,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":95,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":94,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":96,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":94,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":97,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the dependency at resolution time;\r\nusually a constructor function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":94,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":95,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":96,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":98,"name":"handler","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The resolution function to use when the dependency is\r\nneeded."}]},"type":{"type":"reflection","declaration":{"id":99,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"container.ts","line":316,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L316"}],"signatures":[{"id":100,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":316,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L316"}],"parameters":[{"id":101,"name":"container","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":102,"name":"key","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":94,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":95,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":96,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":103,"name":"resolver","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":441,"name":"Resolver","package":"aurelia-dependency-injection"}}],"type":{"type":"intrinsic","name":"any"}}]}}}],"type":{"type":"reference","target":441,"name":"Resolver","package":"aurelia-dependency-injection"}}]},{"id":59,"name":"registerInstance","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":254,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L254"}],"signatures":[{"id":60,"name":"registerInstance","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Registers an existing object instance with the container."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The resolver that was registered."}]}]},"sources":[{"fileName":"container.ts","line":254,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L254"}],"typeParameters":[{"id":61,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":62,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":61,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":63,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":61,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":64,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the dependency at resolution time;\r\nusually a constructor function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":61,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":62,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":63,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":65,"name":"instance","variant":"param","kind":32768,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The instance that will be resolved when the key is matched.\r\nThis defaults to the key value when instance is not supplied."}]},"type":{"type":"reference","target":62,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true}}],"type":{"type":"reference","target":441,"name":"Resolver","package":"aurelia-dependency-injection"}}]},{"id":111,"name":"registerResolver","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":347,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L347"}],"signatures":[{"id":112,"name":"registerResolver","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Registers a custom resolution function such that the container calls this\r\nfunction for each request to obtain the instance."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The resolver that was registered."}]}]},"sources":[{"fileName":"container.ts","line":347,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L347"}],"typeParameters":[{"id":113,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":114,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":113,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":115,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":113,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":116,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the dependency at resolution time;\r\nusually a constructor function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":113,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":114,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":115,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":117,"name":"resolver","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The resolver to use when the dependency is needed."}]},"type":{"type":"reference","target":441,"name":"Resolver","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":441,"name":"Resolver","package":"aurelia-dependency-injection"}}]},{"id":66,"name":"registerSingleton","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":272,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L272"},{"fileName":"container.ts","line":274,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L274"},{"fileName":"container.ts","line":276,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L276"}],"signatures":[{"id":67,"name":"registerSingleton","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Registers a type (constructor function) such that the container always\r\nreturns the same instance for each request."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The resolver that was registered."}]}]},"sources":[{"fileName":"container.ts","line":272,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L272"}],"typeParameters":[{"id":68,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":69,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":68,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":70,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":68,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":71,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the dependency at resolution time;\r\nusually a constructor function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Primitive"},"name":"Primitive","package":"aurelia-dependency-injection"}},{"id":72,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The constructor function to use when the dependency needs to be\r\ninstantiated. This defaults to the key value when fn is not supplied."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":68,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":69,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":70,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":441,"name":"Resolver","package":"aurelia-dependency-injection"}},{"id":73,"name":"registerSingleton","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":274,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L274"}],"typeParameters":[{"id":74,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":75,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":74,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":76,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":74,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":77,"name":"key","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":74,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":75,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":76,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"}},{"id":78,"name":"fn","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":74,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":75,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":76,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":441,"name":"Resolver","package":"aurelia-dependency-injection"}}]},{"id":79,"name":"registerTransient","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":293,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L293"},{"fileName":"container.ts","line":295,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L295"},{"fileName":"container.ts","line":297,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L297"}],"signatures":[{"id":80,"name":"registerTransient","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Registers a type (constructor function) such that the container returns a\r\nnew instance for each request."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The resolver that was registered."}]}]},"sources":[{"fileName":"container.ts","line":293,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L293"}],"typeParameters":[{"id":81,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":82,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":81,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":83,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":81,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":84,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the dependency at resolution time;\r\nusually a constructor function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Primitive"},"name":"Primitive","package":"aurelia-dependency-injection"}},{"id":85,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The constructor function to use when the dependency needs to be\r\ninstantiated. This defaults to the key value when fn is not supplied."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":81,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":82,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":83,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":441,"name":"Resolver","package":"aurelia-dependency-injection"}},{"id":86,"name":"registerTransient","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":295,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L295"}],"typeParameters":[{"id":87,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":88,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":87,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":89,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":87,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":90,"name":"key","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":87,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":88,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":89,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"}},{"id":91,"name":"fn","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":87,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":88,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":89,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":441,"name":"Resolver","package":"aurelia-dependency-injection"}}]},{"id":50,"name":"setHandlerCreatedCallback","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":234,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L234"}],"signatures":[{"id":51,"name":"setHandlerCreatedCallback","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets an invocation handler creation callback that will be called when new\r\nInvocationsHandlers are created (called once per Function)."}]},"sources":[{"fileName":"container.ts","line":234,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L234"}],"typeParameters":[{"id":52,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":53,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":52,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":54,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":52,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":55,"name":"onHandlerCreated","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The callback to be called when an\r\nInvocationsHandler is created."}]},"type":{"type":"reflection","declaration":{"id":56,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"container.ts","line":238,"character":24,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L238"}],"signatures":[{"id":57,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":238,"character":24,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L238"}],"parameters":[{"id":58,"name":"handler","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":9,"typeArguments":[{"type":"reference","target":52,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":53,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":54,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"InvocationHandler","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":9,"typeArguments":[{"type":"reference","target":52,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":53,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":54,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"InvocationHandler","package":"aurelia-dependency-injection"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":134,"name":"unregister","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":414,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L414"}],"signatures":[{"id":135,"name":"unregister","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Unregisters based on key."}]},"sources":[{"fileName":"container.ts","line":414,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L414"}],"parameters":[{"id":136,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the dependency at resolution time; usually a constructor function."}]},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Constructors","children":[36]},{"title":"Properties","children":[39,40,35]},{"title":"Methods","children":[184,166,118,131,175,151,169,144,137,177,48,104,92,59,111,66,79,50,134]}],"sources":[{"fileName":"container.ts","line":171,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L171"}]},{"id":587,"name":"Factory","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to allow injecting dependencies but also passing data to the constructor."}]},"children":[{"id":594,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"resolvers.ts","line":386,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L386"}],"signatures":[{"id":595,"name":"new Factory","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an instance of the Factory class."}]},"sources":[{"fileName":"resolvers.ts","line":386,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L386"}],"typeParameters":[{"id":596,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":597,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":596,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Factory.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":598,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":596,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Factory.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":599,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to resolve from the parent container."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":596,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Factory.TBase","refersToTypeParameter":true},{"type":"reference","target":597,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Factory.TImpl","refersToTypeParameter":true},{"type":"reference","target":598,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Factory.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":587,"typeArguments":[{"type":"reference","target":596,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Factory.TBase","refersToTypeParameter":true},{"type":"reference","target":597,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Factory.TImpl","refersToTypeParameter":true},{"type":"reference","target":598,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Factory.TArgs","refersToTypeParameter":true}],"name":"Factory","package":"aurelia-dependency-injection"}}]},{"id":601,"name":"__resolver_type__","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"A non existent property to help TS distinguish resolvers\r\n\r\nThis is semi-private, and should not be used by application"}]},"sources":[{"fileName":"resolvers.ts","line":380,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L380"}],"type":{"type":"literal","value":"factory"}},{"id":602,"name":"get","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"resolvers.ts","line":397,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L397"}],"signatures":[{"id":603,"name":"get","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to pass the dependencies to the constructor."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns a function that can be invoked to resolve dependencies\r\nlater, and the rest of the parameters."}]}]},"sources":[{"fileName":"resolvers.ts","line":397,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L397"}],"parameters":[{"id":604,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container to invoke the constructor with dependencies\r\nand other parameters."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyFunctor"},"typeArguments":[{"type":"reference","target":596,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Factory.TBase","refersToTypeParameter":true},{"type":"reference","target":597,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Factory.TImpl","refersToTypeParameter":true},{"type":"reference","target":598,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Factory.TArgs","refersToTypeParameter":true}],"name":"DependencyFunctor","package":"aurelia-dependency-injection"}}]},{"id":588,"name":"of","variant":"declaration","kind":2048,"flags":{"isPublic":true,"isStatic":true},"sources":[{"fileName":"resolvers.ts","line":412,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L412"}],"signatures":[{"id":589,"name":"of","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a Factory Resolver for the supplied key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns an instance of Factory for the key."}]}]},"sources":[{"fileName":"resolvers.ts","line":412,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L412"}],"typeParameters":[{"id":590,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":591,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":590,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":592,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":590,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":593,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to resolve."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":590,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":591,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":592,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":587,"typeArguments":[{"type":"reference","target":590,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":591,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":592,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Factory","package":"aurelia-dependency-injection"}}]}],"groups":[{"title":"Constructors","children":[594]},{"title":"Properties","children":[601]},{"title":"Methods","children":[602,588]}],"sources":[{"fileName":"resolvers.ts","line":369,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L369"}],"typeParameters":[{"id":605,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":606,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":596,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Factory.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":596,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Factory.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":607,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":596,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Factory.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":596,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Factory.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}]},{"id":253,"name":"FactoryInvoker","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"An Invoker that is used to invoke a factory method."}]},"children":[{"id":255,"name":"constructor","variant":"declaration","kind":512,"flags":{},"signatures":[{"id":256,"name":"new FactoryInvoker","variant":"signature","kind":16384,"flags":{},"typeParameters":[{"id":257,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":258,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":257,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":259,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":257,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":253,"typeArguments":[{"type":"reference","target":257,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TBase","refersToTypeParameter":true},{"type":"reference","target":258,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TImpl","refersToTypeParameter":true},{"type":"reference","target":259,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TArgs","refersToTypeParameter":true}],"name":"FactoryInvoker","package":"aurelia-dependency-injection"}}]},{"id":254,"name":"instance","variant":"declaration","kind":1024,"flags":{"isPublic":true,"isStatic":true},"comment":{"summary":[{"kind":"text","text":"The singleton instance of the FactoryInvoker."}]},"sources":[{"fileName":"invokers.ts","line":74,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/invokers.ts#L74"}],"type":{"type":"reference","target":253,"typeArguments":[{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"intrinsic","name":"any"}],"name":"Args","package":"aurelia-dependency-injection"}],"name":"FactoryInvoker","package":"aurelia-dependency-injection"}},{"id":260,"name":"invoke","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"invokers.ts","line":83,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/invokers.ts#L83"}],"signatures":[{"id":261,"name":"invoke","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Invokes the function with the provided dependencies."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The result of the function invocation."}]}]},"sources":[{"fileName":"invokers.ts","line":83,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/invokers.ts#L83"}],"parameters":[{"id":262,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The calling container."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":263,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The constructor or factory function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":257,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TBase","refersToTypeParameter":true},{"type":"reference","target":258,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TImpl","refersToTypeParameter":true},{"type":"reference","target":259,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":264,"name":"dependencies","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The dependencies of the function call."}]},"type":{"type":"reference","target":259,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TArgs","refersToTypeParameter":true}}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"ImplOrAny"},"typeArguments":[{"type":"reference","target":258,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TImpl","refersToTypeParameter":true}],"name":"ImplOrAny","package":"aurelia-dependency-injection"},"implementationOf":{"type":"reference","target":240,"name":"Invoker.invoke"}}],"implementationOf":{"type":"reference","target":239,"name":"Invoker.invoke"}},{"id":265,"name":"invokeWithDynamicDependencies","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"invokers.ts","line":106,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/invokers.ts#L106"}],"signatures":[{"id":266,"name":"invokeWithDynamicDependencies","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Invokes the function with the provided dependencies."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The result of the function invocation."}]}]},"sources":[{"fileName":"invokers.ts","line":106,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/invokers.ts#L106"}],"parameters":[{"id":267,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The calling container."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":268,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The constructor or factory function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":257,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TBase","refersToTypeParameter":true},{"type":"reference","target":258,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TImpl","refersToTypeParameter":true},{"type":"reference","target":259,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":269,"name":"staticDependencies","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The static dependencies of the function."}]},"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":259,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TArgs","refersToTypeParameter":true}}}},{"id":270,"name":"dynamicDependencies","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Additional dependencies to use during invocation."}]},"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":259,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TArgs","refersToTypeParameter":true}}}}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"ImplOrAny"},"typeArguments":[{"type":"reference","target":258,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TImpl","refersToTypeParameter":true}],"name":"ImplOrAny","package":"aurelia-dependency-injection"},"implementationOf":{"type":"reference","target":245,"name":"Invoker.invokeWithDynamicDependencies"}}],"implementationOf":{"type":"reference","target":244,"name":"Invoker.invokeWithDynamicDependencies"}}],"groups":[{"title":"Constructors","children":[255]},{"title":"Properties","children":[254]},{"title":"Methods","children":[260,265]}],"sources":[{"fileName":"invokers.ts","line":66,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/invokers.ts#L66"}],"typeParameters":[{"id":271,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":272,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":257,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":257,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":273,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":257,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":257,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"implementedTypes":[{"type":"reference","target":238,"typeArguments":[{"type":"reference","target":257,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TBase","refersToTypeParameter":true},{"type":"reference","target":258,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TImpl","refersToTypeParameter":true},{"type":"reference","target":259,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TArgs","refersToTypeParameter":true}],"name":"Invoker","package":"aurelia-dependency-injection"}]},{"id":9,"name":"InvocationHandler","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Stores the information needed to invoke a function."}]},"children":[{"id":10,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"container.ts","line":64,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L64"}],"signatures":[{"id":11,"name":"new InvocationHandler","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Instantiates an InvocationDescription."}]},"sources":[{"fileName":"container.ts","line":64,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L64"}],"typeParameters":[{"id":12,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":13,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"}},{"id":14,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]}}],"parameters":[{"id":15,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The Function described by this description object."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":12,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TBase","refersToTypeParameter":true},{"type":"reference","target":13,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TImpl","refersToTypeParameter":true},{"type":"reference","target":14,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":16,"name":"invoker","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The strategy for invoking the function."}]},"type":{"type":"reference","target":238,"typeArguments":[{"type":"reference","target":12,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TBase","refersToTypeParameter":true},{"type":"reference","target":13,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TImpl","refersToTypeParameter":true},{"type":"reference","target":14,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TArgs","refersToTypeParameter":true}],"name":"Invoker","package":"aurelia-dependency-injection"}},{"id":17,"name":"dependencies","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The static dependencies of the function call."}]},"type":{"type":"reference","target":14,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TArgs","refersToTypeParameter":true}}],"type":{"type":"reference","target":9,"typeArguments":[{"type":"reference","target":12,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TBase","refersToTypeParameter":true},{"type":"reference","target":13,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TImpl","refersToTypeParameter":true},{"type":"reference","target":14,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TArgs","refersToTypeParameter":true}],"name":"InvocationHandler","package":"aurelia-dependency-injection"}}]},{"id":20,"name":"dependencies","variant":"declaration","kind":1024,"flags":{"isPublic":true},"comment":{"summary":[{"kind":"text","text":"The statically known dependencies of this function invocation."}]},"sources":[{"fileName":"container.ts","line":56,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L56"}],"type":{"type":"reference","target":14,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TArgs","refersToTypeParameter":true}},{"id":18,"name":"fn","variant":"declaration","kind":1024,"flags":{"isPublic":true},"comment":{"summary":[{"kind":"text","text":"The function to be invoked by this handler."}]},"sources":[{"fileName":"container.ts","line":46,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L46"}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":12,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TBase","refersToTypeParameter":true},{"type":"reference","target":13,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TImpl","refersToTypeParameter":true},{"type":"reference","target":14,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":19,"name":"invoker","variant":"declaration","kind":1024,"flags":{"isPublic":true},"comment":{"summary":[{"kind":"text","text":"The invoker implementation that will be used to actually invoke the function."}]},"sources":[{"fileName":"container.ts","line":51,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L51"}],"type":{"type":"reference","target":238,"typeArguments":[{"type":"reference","target":12,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TBase","refersToTypeParameter":true},{"type":"reference","target":13,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TImpl","refersToTypeParameter":true},{"type":"reference","target":14,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TArgs","refersToTypeParameter":true}],"name":"Invoker","package":"aurelia-dependency-injection"}},{"id":21,"name":"invoke","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":80,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L80"}],"signatures":[{"id":22,"name":"invoke","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Invokes the function."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The result of the function invocation."}]}]},"sources":[{"fileName":"container.ts","line":80,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L80"}],"parameters":[{"id":23,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The calling container."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":24,"name":"dynamicDependencies","variant":"param","kind":32768,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Additional dependencies to use during invocation."}]},"type":{"type":"array","elementType":{"type":"reference","target":14,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TArgs","refersToTypeParameter":true}}}],"type":{"type":"reference","target":13,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TImpl","refersToTypeParameter":true}}]}],"groups":[{"title":"Constructors","children":[10]},{"title":"Properties","children":[20,18,19]},{"title":"Methods","children":[21]}],"sources":[{"fileName":"container.ts","line":38,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L38"}],"typeParameters":[{"id":25,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":26,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":12,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":27,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":12,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}]},{"id":498,"name":"Lazy","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to allow functions/classes to specify lazy resolution logic."}]},"children":[{"id":505,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"resolvers.ts","line":176,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L176"}],"signatures":[{"id":506,"name":"new Lazy","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an instance of the Lazy class."}]},"sources":[{"fileName":"resolvers.ts","line":176,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L176"}],"typeParameters":[{"id":507,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":508,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":507,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":509,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":507,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":510,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to lazily resolve."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":507,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TBase","refersToTypeParameter":true},{"type":"reference","target":508,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TImpl","refersToTypeParameter":true},{"type":"reference","target":509,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":498,"typeArguments":[{"type":"reference","target":507,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TBase","refersToTypeParameter":true},{"type":"reference","target":508,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TImpl","refersToTypeParameter":true},{"type":"reference","target":509,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TArgs","refersToTypeParameter":true}],"name":"Lazy","package":"aurelia-dependency-injection"}}]},{"id":512,"name":"__resolver_type__","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"A non existent property to help TS distinguish resolvers\r\n\r\nThis is semi-private, and should not be used by application"}]},"sources":[{"fileName":"resolvers.ts","line":170,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L170"}],"type":{"type":"literal","value":"lazy"}},{"id":513,"name":"get","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"resolvers.ts","line":187,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L187"}],"signatures":[{"id":514,"name":"get","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to lazily resolve the dependency into a lazy locator\r\nfunction."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns a function which can be invoked at a later time to obtain\r\nthe actual dependency."}]}]},"sources":[{"fileName":"resolvers.ts","line":187,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L187"}],"parameters":[{"id":515,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container to resolve from."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}],"type":{"type":"reflection","declaration":{"id":516,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"resolvers.ts","line":187,"character":36,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L187"}],"signatures":[{"id":517,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"resolvers.ts","line":187,"character":36,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L187"}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"ImplOrAny"},"typeArguments":[{"type":"reference","target":508,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TImpl","refersToTypeParameter":true}],"name":"ImplOrAny","package":"aurelia-dependency-injection"}}]}}}]},{"id":499,"name":"of","variant":"declaration","kind":2048,"flags":{"isPublic":true,"isStatic":true},"sources":[{"fileName":"resolvers.ts","line":196,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L196"}],"signatures":[{"id":500,"name":"of","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a Lazy Resolver for the supplied key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns an instance of Lazy for the key."}]}]},"sources":[{"fileName":"resolvers.ts","line":196,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L196"}],"typeParameters":[{"id":501,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":502,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":501,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":503,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":501,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":504,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to lazily resolve."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":501,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":502,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":503,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":498,"typeArguments":[{"type":"reference","target":501,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":502,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":503,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Lazy","package":"aurelia-dependency-injection"}}]}],"groups":[{"title":"Constructors","children":[505]},{"title":"Properties","children":[512]},{"title":"Methods","children":[513,499]}],"sources":[{"fileName":"resolvers.ts","line":159,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L159"}],"typeParameters":[{"id":518,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":519,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":507,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":507,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":520,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":507,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":507,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}]},{"id":608,"name":"NewInstance","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to inject a new instance of a dependency, without regard for existing\r\ninstances in the container. Instances can optionally be registered in the\r\ncontainer\r\nunder a different key by supplying a key using the "},{"kind":"code","text":"`as`"},{"kind":"text","text":" method."}]},"children":[{"id":616,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"resolvers.ts","line":451,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L451"}],"signatures":[{"id":617,"name":"new NewInstance","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an instance of the NewInstance class."}]},"sources":[{"fileName":"resolvers.ts","line":451,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L451"}],"typeParameters":[{"id":618,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":619,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":618,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":620,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":618,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":621,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to resolve/instantiate."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":618,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TBase","refersToTypeParameter":true},{"type":"reference","target":619,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TImpl","refersToTypeParameter":true},{"type":"reference","target":620,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":622,"name":"dynamicDependencies","variant":"param","kind":32768,"flags":{"isRest":true},"comment":{"summary":[{"kind":"text","text":"An optional list of dynamic dependencies."}]},"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":620,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TArgs","refersToTypeParameter":true}}}}],"type":{"type":"reference","target":608,"typeArguments":[{"type":"reference","target":618,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TBase","refersToTypeParameter":true},{"type":"reference","target":619,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TImpl","refersToTypeParameter":true},{"type":"reference","target":620,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TArgs","refersToTypeParameter":true}],"name":"NewInstance","package":"aurelia-dependency-injection"}}]},{"id":626,"name":"__resolver_type__","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"A non existent property to help TS distinguish resolvers\r\n\r\nThis is semi-private, and should not be used by application"}]},"sources":[{"fileName":"resolvers.ts","line":444,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L444"}],"type":{"type":"literal","value":"newInstance"}},{"id":630,"name":"as","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"resolvers.ts","line":491,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L491"}],"signatures":[{"id":631,"name":"as","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Instructs the NewInstance resolver to register the resolved instance using\r\nthe supplied key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns the NewInstance resolver."}]}]},"sources":[{"fileName":"resolvers.ts","line":491,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L491"}],"parameters":[{"id":632,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to register the instance with."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":618,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TBase","refersToTypeParameter":true},{"type":"reference","target":619,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TImpl","refersToTypeParameter":true},{"type":"reference","target":620,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":608,"typeArguments":[{"type":"reference","target":618,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TBase","refersToTypeParameter":true},{"type":"reference","target":619,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TImpl","refersToTypeParameter":true},{"type":"reference","target":620,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TArgs","refersToTypeParameter":true}],"name":"NewInstance","package":"aurelia-dependency-injection"}}]},{"id":627,"name":"get","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"resolvers.ts","line":464,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L464"}],"signatures":[{"id":628,"name":"get","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to instantiate the dependency and potentially\r\nregister\r\nas another key if the "},{"kind":"code","text":"`as`"},{"kind":"text","text":" method was used."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns the matching instance from the parent container"}]}]},"sources":[{"fileName":"resolvers.ts","line":464,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L464"}],"parameters":[{"id":629,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container to resolve the parent from."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"ImplOrAny"},"typeArguments":[{"type":"reference","target":619,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TImpl","refersToTypeParameter":true}],"name":"ImplOrAny","package":"aurelia-dependency-injection"}}]},{"id":609,"name":"of","variant":"declaration","kind":2048,"flags":{"isPublic":true,"isStatic":true},"sources":[{"fileName":"resolvers.ts","line":502,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L502"}],"signatures":[{"id":610,"name":"of","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an NewInstance Resolver for the supplied key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns an instance of NewInstance for the key."}]}]},"sources":[{"fileName":"resolvers.ts","line":502,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L502"}],"typeParameters":[{"id":611,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":612,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":611,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":613,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":611,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":614,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to resolve/instantiate."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":611,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":612,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":613,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":615,"name":"dynamicDependencies","variant":"param","kind":32768,"flags":{"isRest":true},"comment":{"summary":[{"kind":"text","text":"An optional list of dynamic dependencies."}]},"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":613,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}}],"type":{"type":"reference","target":608,"typeArguments":[{"type":"reference","target":611,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":612,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":613,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"NewInstance","package":"aurelia-dependency-injection"}}]}],"groups":[{"title":"Constructors","children":[616]},{"title":"Properties","children":[626]},{"title":"Methods","children":[630,627,609]}],"sources":[{"fileName":"resolvers.ts","line":428,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L428"}],"typeParameters":[{"id":633,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":634,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":618,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":618,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":635,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":618,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":618,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}]},{"id":542,"name":"Optional","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to allow functions/classes to specify an optional dependency, which will\r\nbe resolved only if already registred with the container."}]},"children":[{"id":550,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"resolvers.ts","line":282,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L282"}],"signatures":[{"id":551,"name":"new Optional","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an instance of the Optional class."}]},"sources":[{"fileName":"resolvers.ts","line":282,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L282"}],"typeParameters":[{"id":552,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":553,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":552,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Optional.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":554,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":552,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Optional.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":555,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to optionally resolve for."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":552,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Optional.TBase","refersToTypeParameter":true},{"type":"reference","target":553,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Optional.TImpl","refersToTypeParameter":true},{"type":"reference","target":554,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Optional.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":556,"name":"checkParent","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Indicates whether or not the parent container hierarchy\r\nshould be checked."}]},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"true"}],"type":{"type":"reference","target":542,"typeArguments":[{"type":"reference","target":552,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Optional.TBase","refersToTypeParameter":true},{"type":"reference","target":553,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Optional.TImpl","refersToTypeParameter":true},{"type":"reference","target":554,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Optional.TArgs","refersToTypeParameter":true}],"name":"Optional","package":"aurelia-dependency-injection"}}]},{"id":559,"name":"__resolver_type__","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"A non existent property to help TS distinguish resolvers\r\n\r\nThis is semi-private, and should not be used by application"}]},"sources":[{"fileName":"resolvers.ts","line":274,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L274"}],"type":{"type":"literal","value":"optional"}},{"id":560,"name":"get","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"resolvers.ts","line":292,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L292"}],"signatures":[{"id":561,"name":"get","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to provide optional resolution of the key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns the instance if found; otherwise null."}]}]},"sources":[{"fileName":"resolvers.ts","line":292,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L292"}],"parameters":[{"id":562,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container to resolve from."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":553,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Optional.TImpl","refersToTypeParameter":true}]}}]},{"id":543,"name":"of","variant":"declaration","kind":2048,"flags":{"isPublic":true,"isStatic":true},"sources":[{"fileName":"resolvers.ts","line":307,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L307"}],"signatures":[{"id":544,"name":"of","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an Optional Resolver for the supplied key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns an instance of Optional for the key."}]}]},"sources":[{"fileName":"resolvers.ts","line":307,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L307"}],"typeParameters":[{"id":545,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":546,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":545,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":547,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":545,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":548,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to optionally resolve for."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":545,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":546,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":547,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":549,"name":"checkParent","variant":"param","kind":32768,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Indicates whether or not the parent container\r\nhierarchy should be checked."}]},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"true"}],"type":{"type":"reference","target":542,"typeArguments":[{"type":"reference","target":545,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":546,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":547,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Optional","package":"aurelia-dependency-injection"}}]}],"groups":[{"title":"Constructors","children":[550]},{"title":"Properties","children":[559]},{"title":"Methods","children":[560,543]}],"sources":[{"fileName":"resolvers.ts","line":260,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L260"}],"typeParameters":[{"id":563,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":564,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":552,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Optional.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":552,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Optional.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":565,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":552,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Optional.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":552,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Optional.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}]},{"id":566,"name":"Parent","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to inject the dependency from the parent container instead of the current\r\none."}]},"children":[{"id":573,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"resolvers.ts","line":338,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L338"}],"signatures":[{"id":574,"name":"new Parent","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an instance of the Parent class."}]},"sources":[{"fileName":"resolvers.ts","line":338,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L338"}],"typeParameters":[{"id":575,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":576,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":575,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Parent.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":577,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":575,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Parent.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":578,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to resolve from the parent container."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":575,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Parent.TBase","refersToTypeParameter":true},{"type":"reference","target":576,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Parent.TImpl","refersToTypeParameter":true},{"type":"reference","target":577,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Parent.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":566,"typeArguments":[{"type":"reference","target":575,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Parent.TBase","refersToTypeParameter":true},{"type":"reference","target":576,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Parent.TImpl","refersToTypeParameter":true},{"type":"reference","target":577,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Parent.TArgs","refersToTypeParameter":true}],"name":"Parent","package":"aurelia-dependency-injection"}}]},{"id":580,"name":"__resolver_type__","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"A non existent property to help TS distinguish resolvers\r\n\r\nThis is semi-private, and should not be used by application"}]},"sources":[{"fileName":"resolvers.ts","line":332,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L332"}],"type":{"type":"literal","value":"parent"}},{"id":581,"name":"get","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"resolvers.ts","line":347,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L347"}],"signatures":[{"id":582,"name":"get","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to load the dependency from the parent container"}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns the matching instance from the parent container"}]}]},"sources":[{"fileName":"resolvers.ts","line":347,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L347"}],"parameters":[{"id":583,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container to resolve the parent from."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":576,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Parent.TImpl","refersToTypeParameter":true}]}}]},{"id":567,"name":"of","variant":"declaration","kind":2048,"flags":{"isPublic":true,"isStatic":true},"sources":[{"fileName":"resolvers.ts","line":356,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L356"}],"signatures":[{"id":568,"name":"of","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a Parent Resolver for the supplied key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns an instance of Parent for the key."}]}]},"sources":[{"fileName":"resolvers.ts","line":356,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L356"}],"typeParameters":[{"id":569,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":570,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":569,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":571,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":569,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":572,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to resolve."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":569,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":570,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":571,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":566,"typeArguments":[{"type":"reference","target":569,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":570,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":571,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Parent","package":"aurelia-dependency-injection"}}]}],"groups":[{"title":"Constructors","children":[573]},{"title":"Properties","children":[580]},{"title":"Methods","children":[581,567]}],"sources":[{"fileName":"resolvers.ts","line":321,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L321"}],"typeParameters":[{"id":584,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":585,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":575,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Parent.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":575,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Parent.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":586,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":575,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Parent.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":575,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Parent.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}]},{"id":326,"name":"SingletonRegistration","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to allow functions/classes to indicate that they should be registered as\r\nsingletons with the container."}]},"children":[{"id":327,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"registrations.ts","line":122,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L122"}],"signatures":[{"id":328,"name":"new SingletonRegistration","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an instance of SingletonRegistration."}]},"sources":[{"fileName":"registrations.ts","line":122,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L122"}],"typeParameters":[{"id":329,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":330,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"}},{"id":331,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]}}],"parameters":[{"id":332,"name":"keyOrRegisterInChild","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":329,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TBase","refersToTypeParameter":true},{"type":"reference","target":330,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TImpl","refersToTypeParameter":true},{"type":"reference","target":331,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":333,"name":"registerInChild","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"reference","target":326,"typeArguments":[{"type":"reference","target":329,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TBase","refersToTypeParameter":true},{"type":"reference","target":330,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TImpl","refersToTypeParameter":true},{"type":"reference","target":331,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TArgs","refersToTypeParameter":true}],"name":"SingletonRegistration","package":"aurelia-dependency-injection"}}]},{"id":336,"name":"registerResolver","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"registrations.ts","line":140,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L140"}],"signatures":[{"id":337,"name":"registerResolver","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to register the resolver."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The resolver that was registered."}]}]},"sources":[{"fileName":"registrations.ts","line":140,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L140"}],"parameters":[{"id":338,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container the resolver is being registered with."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":339,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key the resolver should be registered as."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":329,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TBase","refersToTypeParameter":true},{"type":"reference","target":330,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TImpl","refersToTypeParameter":true},{"type":"reference","target":331,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":340,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The function to create the resolver for."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":329,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TBase","refersToTypeParameter":true},{"type":"reference","target":330,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TImpl","refersToTypeParameter":true},{"type":"reference","target":331,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":441,"name":"Resolver","package":"aurelia-dependency-injection"},"implementationOf":{"type":"reference","target":303,"name":"Registration.registerResolver"}}],"implementationOf":{"type":"reference","target":302,"name":"Registration.registerResolver"}}],"groups":[{"title":"Constructors","children":[327]},{"title":"Methods","children":[336]}],"sources":[{"fileName":"registrations.ts","line":110,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L110"}],"typeParameters":[{"id":341,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":342,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":329,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":343,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":329,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"implementedTypes":[{"type":"reference","target":301,"typeArguments":[{"type":"reference","target":329,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TBase","refersToTypeParameter":true},{"type":"reference","target":330,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TImpl","refersToTypeParameter":true},{"type":"reference","target":331,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TArgs","refersToTypeParameter":true}],"name":"Registration","package":"aurelia-dependency-injection"}]},{"id":479,"name":"StrategyResolver","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to resolve instances, singletons, transients, aliases"}]},"children":[{"id":480,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"resolvers.ts","line":117,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L117"}],"signatures":[{"id":481,"name":"new StrategyResolver","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an instance of the StrategyResolver class."}]},"sources":[{"fileName":"resolvers.ts","line":117,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L117"}],"typeParameters":[{"id":482,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":483,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"}},{"id":484,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]}},{"id":485,"name":"TStrategyKey","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","target":463,"typeArguments":[{"type":"reference","target":482,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TBase","refersToTypeParameter":true},{"type":"reference","target":483,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TImpl","refersToTypeParameter":true},{"type":"reference","target":484,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TArgs","refersToTypeParameter":true}],"name":"StrategyState","package":"aurelia-dependency-injection"}}}],"parameters":[{"id":486,"name":"strategy","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The type of resolution strategy."}]},"type":{"type":"reference","target":485,"name":"TStrategyKey","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TStrategyKey","refersToTypeParameter":true}},{"id":487,"name":"state","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The state associated with the resolution strategy."}]},"type":{"type":"indexedAccess","indexType":{"type":"reference","target":485,"name":"TStrategyKey","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TStrategyKey","refersToTypeParameter":true},"objectType":{"type":"reference","target":463,"typeArguments":[{"type":"reference","target":482,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TBase","refersToTypeParameter":true},{"type":"reference","target":483,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TImpl","refersToTypeParameter":true},{"type":"reference","target":484,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TArgs","refersToTypeParameter":true}],"name":"StrategyState","package":"aurelia-dependency-injection"}}}],"type":{"type":"reference","target":479,"typeArguments":[{"type":"reference","target":482,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TBase","refersToTypeParameter":true},{"type":"reference","target":483,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TImpl","refersToTypeParameter":true},{"type":"reference","target":484,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TArgs","refersToTypeParameter":true},{"type":"reference","target":485,"name":"TStrategyKey","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TStrategyKey","refersToTypeParameter":true}],"name":"StrategyResolver","package":"aurelia-dependency-injection"}}]},{"id":489,"name":"state","variant":"declaration","kind":1024,"flags":{"isPublic":true},"sources":[{"fileName":"resolvers.ts","line":110,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L110"}],"type":{"type":"intrinsic","name":"any"}},{"id":488,"name":"strategy","variant":"declaration","kind":1024,"flags":{"isPublic":true},"sources":[{"fileName":"resolvers.ts","line":109,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L109"}],"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","target":463,"typeArguments":[{"type":"reference","target":482,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TBase","refersToTypeParameter":true},{"type":"reference","target":483,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TImpl","refersToTypeParameter":true},{"type":"reference","target":484,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TArgs","refersToTypeParameter":true}],"name":"StrategyState","package":"aurelia-dependency-injection"}}},{"id":490,"name":"get","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"resolvers.ts","line":129,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L129"}],"signatures":[{"id":491,"name":"get","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to allow custom resolution of dependencies for a\r\nfunction/class."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns the resolved object."}]}]},"sources":[{"fileName":"resolvers.ts","line":129,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L129"}],"parameters":[{"id":492,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container to resolve from."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":493,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that the resolver was registered as."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":482,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TBase","refersToTypeParameter":true},{"type":"reference","target":483,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TImpl","refersToTypeParameter":true},{"type":"reference","target":484,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":483,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TImpl","refersToTypeParameter":true}}]}],"groups":[{"title":"Constructors","children":[480]},{"title":"Properties","children":[489,488]},{"title":"Methods","children":[490]}],"sources":[{"fileName":"resolvers.ts","line":103,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L103"}],"typeParameters":[{"id":494,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":495,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":482,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":496,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":482,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}},{"id":497,"name":"TStrategyKey","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","target":463,"typeArguments":[{"type":"reference","target":482,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TBase","refersToTypeParameter":true},{"type":"reference","target":483,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TImpl","refersToTypeParameter":true},{"type":"reference","target":484,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TArgs","refersToTypeParameter":true}],"name":"StrategyState","package":"aurelia-dependency-injection"}}}]},{"id":310,"name":"TransientRegistration","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to allow functions/classes to indicate that they should be registered as\r\ntransients with the container."}]},"children":[{"id":311,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"registrations.ts","line":81,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L81"}],"signatures":[{"id":312,"name":"new TransientRegistration","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an instance of TransientRegistration."}]},"sources":[{"fileName":"registrations.ts","line":81,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L81"}],"typeParameters":[{"id":313,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":314,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"}},{"id":315,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]}}],"parameters":[{"id":316,"name":"key","variant":"param","kind":32768,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The key to register as."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":313,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TBase","refersToTypeParameter":true},{"type":"reference","target":314,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TImpl","refersToTypeParameter":true},{"type":"reference","target":315,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":310,"typeArguments":[{"type":"reference","target":313,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TBase","refersToTypeParameter":true},{"type":"reference","target":314,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TImpl","refersToTypeParameter":true},{"type":"reference","target":315,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TArgs","refersToTypeParameter":true}],"name":"TransientRegistration","package":"aurelia-dependency-injection"}}]},{"id":318,"name":"registerResolver","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"registrations.ts","line":92,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L92"}],"signatures":[{"id":319,"name":"registerResolver","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to register the resolver."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The resolver that was registered."}]}]},"sources":[{"fileName":"registrations.ts","line":92,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L92"}],"parameters":[{"id":320,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container the resolver is being registered with."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":321,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key the resolver should be registered as."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":313,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TBase","refersToTypeParameter":true},{"type":"reference","target":314,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TImpl","refersToTypeParameter":true},{"type":"reference","target":315,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":322,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The function to create the resolver for."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":313,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TBase","refersToTypeParameter":true},{"type":"reference","target":314,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TImpl","refersToTypeParameter":true},{"type":"reference","target":315,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":441,"name":"Resolver","package":"aurelia-dependency-injection"},"implementationOf":{"type":"reference","target":303,"name":"Registration.registerResolver"}}],"implementationOf":{"type":"reference","target":302,"name":"Registration.registerResolver"}}],"groups":[{"title":"Constructors","children":[311]},{"title":"Methods","children":[318]}],"sources":[{"fileName":"registrations.ts","line":72,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L72"}],"typeParameters":[{"id":323,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":324,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":313,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":325,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":313,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"implementedTypes":[{"type":"reference","target":301,"typeArguments":[{"type":"reference","target":313,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TBase","refersToTypeParameter":true},{"type":"reference","target":314,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TImpl","refersToTypeParameter":true},{"type":"reference","target":315,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TArgs","refersToTypeParameter":true}],"name":"Registration","package":"aurelia-dependency-injection"}]},{"id":28,"name":"ContainerConfiguration","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to configure a Container instance."}]},"children":[{"id":33,"name":"handlers","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"container.ts","line":110,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L110"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es2015.collection.d.ts","qualifiedName":"Map"},"typeArguments":[{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"}],"name":"Map","package":"typescript"}},{"id":29,"name":"onHandlerCreated","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"An optional callback which will be called when any function needs an\r\nInvocationHandler created (called once per Function)."}]},"sources":[{"fileName":"container.ts","line":106,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L106"}],"type":{"type":"reflection","declaration":{"id":30,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"container.ts","line":106,"character":21,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L106"}],"signatures":[{"id":31,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":106,"character":21,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L106"}],"parameters":[{"id":32,"name":"handler","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":9,"typeArguments":[{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"}],"name":"InvocationHandler","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":9,"typeArguments":[{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"}],"name":"InvocationHandler","package":"aurelia-dependency-injection"}}]}}}],"groups":[{"title":"Properties","children":[33,29]}],"sources":[{"fileName":"container.ts","line":101,"character":17,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L101"}]},{"id":238,"name":"Invoker","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[{"kind":"text","text":"A strategy for invoking a function, resulting in an object instance."}]},"children":[{"id":239,"name":"invoke","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"invokers.ts","line":41,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/invokers.ts#L41"}],"signatures":[{"id":240,"name":"invoke","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Invokes the function with the provided dependencies."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The result of the function invocation."}]}]},"sources":[{"fileName":"invokers.ts","line":41,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/invokers.ts#L41"}],"parameters":[{"id":241,"name":"container","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":242,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The constructor or factory function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":250,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TBase","refersToTypeParameter":true},{"type":"reference","target":251,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TImpl","refersToTypeParameter":true},{"type":"reference","target":252,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":243,"name":"dependencies","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The dependencies of the function call."}]},"type":{"type":"reference","target":252,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TArgs","refersToTypeParameter":true}}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"ImplOrAny"},"typeArguments":[{"type":"reference","target":251,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TImpl","refersToTypeParameter":true}],"name":"ImplOrAny","package":"aurelia-dependency-injection"}}]},{"id":244,"name":"invokeWithDynamicDependencies","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"invokers.ts","line":55,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/invokers.ts#L55"}],"signatures":[{"id":245,"name":"invokeWithDynamicDependencies","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Invokes the function with the provided dependencies."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The result of the function invocation."}]}]},"sources":[{"fileName":"invokers.ts","line":55,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/invokers.ts#L55"}],"parameters":[{"id":246,"name":"container","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":247,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The constructor or factory function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":250,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TBase","refersToTypeParameter":true},{"type":"reference","target":251,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TImpl","refersToTypeParameter":true},{"type":"reference","target":252,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":248,"name":"staticDependencies","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The static dependencies of the function."}]},"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":252,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TArgs","refersToTypeParameter":true}}}},{"id":249,"name":"dynamicDependencies","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Additional dependencies to use during\r\ninvocation."}]},"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":252,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TArgs","refersToTypeParameter":true}}}}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"ImplOrAny"},"typeArguments":[{"type":"reference","target":251,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TImpl","refersToTypeParameter":true}],"name":"ImplOrAny","package":"aurelia-dependency-injection"}}]}],"groups":[{"title":"Methods","children":[239,244]}],"sources":[{"fileName":"invokers.ts","line":34,"character":17,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/invokers.ts#L34"}],"typeParameters":[{"id":250,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":251,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":250,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":252,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":250,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"implementedBy":[{"type":"reference","target":253,"name":"FactoryInvoker"}]},{"id":301,"name":"Registration","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[{"kind":"text","text":"Customizes how a particular function is resolved by the Container."}]},"children":[{"id":302,"name":"registerResolver","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"registrations.ts","line":61,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L61"}],"signatures":[{"id":303,"name":"registerResolver","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to register the resolver."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The resolver that was registered."}]}]},"sources":[{"fileName":"registrations.ts","line":61,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L61"}],"parameters":[{"id":304,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container the resolver is being registered with."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":305,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key the resolver should be registered as."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":307,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Registration.TBase","refersToTypeParameter":true},{"type":"reference","target":308,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Registration.TImpl","refersToTypeParameter":true},{"type":"reference","target":309,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Registration.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":306,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The function to create the resolver for."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":307,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Registration.TBase","refersToTypeParameter":true},{"type":"reference","target":308,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Registration.TImpl","refersToTypeParameter":true},{"type":"reference","target":309,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Registration.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":441,"name":"Resolver","package":"aurelia-dependency-injection"}}]}],"groups":[{"title":"Methods","children":[302]}],"sources":[{"fileName":"registrations.ts","line":50,"character":17,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L50"}],"typeParameters":[{"id":307,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":308,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":307,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Registration.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":309,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":307,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Registration.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"implementedBy":[{"type":"reference","target":326,"name":"SingletonRegistration"},{"type":"reference","target":310,"name":"TransientRegistration"}]},{"id":441,"name":"Resolver","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to allow functions/classes to specify custom dependency resolution logic."}]},"children":[{"id":442,"name":"get","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"resolvers.ts","line":42,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L42"}],"signatures":[{"id":443,"name":"get","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to allow custom resolution of dependencies for a\r\nfunction/class."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns the resolved object."}]}]},"sources":[{"fileName":"resolvers.ts","line":42,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L42"}],"parameters":[{"id":444,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container to resolve from."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":445,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that the resolver was registered as."}]},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"any"}}]}],"groups":[{"title":"Methods","children":[442]}],"sources":[{"fileName":"resolvers.ts","line":34,"character":17,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L34"}]},{"id":463,"name":"StrategyState","variant":"declaration","kind":256,"flags":{},"children":[{"id":464,"name":"0","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"resolvers.ts","line":70,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L70"}],"type":{"type":"reference","target":477,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TImpl","refersToTypeParameter":true}},{"id":465,"name":"1","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"resolvers.ts","line":71,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L71"}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":476,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TBase","refersToTypeParameter":true},{"type":"reference","target":477,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TImpl","refersToTypeParameter":true},{"type":"reference","target":478,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":466,"name":"2","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"resolvers.ts","line":72,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L72"}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":476,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TBase","refersToTypeParameter":true},{"type":"reference","target":477,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TImpl","refersToTypeParameter":true},{"type":"reference","target":478,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":467,"name":"3","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"resolvers.ts","line":73,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L73"}],"type":{"type":"reference","target":454,"typeArguments":[{"type":"reference","target":476,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TBase","refersToTypeParameter":true},{"type":"reference","target":477,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TImpl","refersToTypeParameter":true},{"type":"reference","target":478,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TArgs","refersToTypeParameter":true}],"name":"StrategyFunctor","package":"aurelia-dependency-injection"}},{"id":468,"name":"4","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"For typings purposes, this is done as ({ get: StrategyFunctor } | TImpl)[]\r\nBut it should be understood, and used as [{ get: StrategyFunctor }, ...TImp[]]"}]},"sources":[{"fileName":"resolvers.ts","line":78,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L78"}],"type":{"type":"array","elementType":{"type":"union","types":[{"type":"reference","target":477,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TImpl","refersToTypeParameter":true},{"type":"reflection","declaration":{"id":469,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":470,"name":"get","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"resolvers.ts","line":79,"character":4,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L79"}],"type":{"type":"reflection","declaration":{"id":471,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"resolvers.ts","line":79,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L79"}],"signatures":[{"id":472,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"resolvers.ts","line":79,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L79"}],"parameters":[{"id":473,"name":"container","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":474,"name":"key","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":476,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TBase","refersToTypeParameter":true},{"type":"reference","target":477,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TImpl","refersToTypeParameter":true},{"type":"reference","target":478,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":477,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TImpl","refersToTypeParameter":true}}]}}}],"groups":[{"title":"Properties","children":[470]}],"sources":[{"fileName":"resolvers.ts","line":78,"character":21,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L78"}]}}]}}},{"id":475,"name":"5","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"resolvers.ts","line":84,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L84"}],"type":{"type":"intrinsic","name":"any"}}],"groups":[{"title":"Properties","children":[464,465,466,467,468,475]}],"sources":[{"fileName":"resolvers.ts","line":65,"character":17,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L65"}],"typeParameters":[{"id":476,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":477,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":476,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":476,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":478,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":476,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":476,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}]},{"id":453,"name":"IStrategy","variant":"declaration","kind":2097152,"flags":{},"sources":[{"fileName":"resolvers.ts","line":53,"character":12,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L53"}],"type":{"type":"union","types":[{"type":"literal","value":1},{"type":"literal","value":2},{"type":"literal","value":3},{"type":"literal","value":4},{"type":"literal","value":5}]}},{"id":215,"name":"Injectable","variant":"declaration","kind":2097152,"flags":{},"sources":[{"fileName":"injection.ts","line":6,"character":12,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/injection.ts#L6"}],"type":{"type":"intersection","types":[{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Function"},"name":"Function","package":"typescript"},{"type":"reflection","declaration":{"id":216,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":217,"name":"inject","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"injection.ts","line":6,"character":38,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/injection.ts#L6"}],"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"reflection","declaration":{"id":218,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"injection.ts","line":6,"character":56,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/injection.ts#L6"}],"signatures":[{"id":219,"name":"__type","variant":"signature","kind":4096,"flags":{},"type":{"type":"array","elementType":{"type":"intrinsic","name":"any"}}}]}}]}}],"groups":[{"title":"Properties","children":[217]}],"sources":[{"fileName":"injection.ts","line":6,"character":36,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/injection.ts#L6"}]}}]}},{"id":192,"name":"ResolvedValue","variant":"declaration","kind":2097152,"flags":{},"sources":[{"fileName":"container.ts","line":610,"character":12,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L610"}],"typeParameters":[{"id":201,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"type":{"type":"conditional","checkType":{"type":"reference","target":201,"name":"T","package":"aurelia-dependency-injection","refersToTypeParameter":true},"extendsType":{"type":"reflection","declaration":{"id":193,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"container.ts","line":611,"character":12,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L611"}],"signatures":[{"id":194,"name":"new ResolvedValue","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"container.ts","line":611,"character":14,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L611"}],"parameters":[{"id":195,"name":"args","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"any"}}}],"type":{"type":"reference","target":{"sourceFileName":"src/container.ts","qualifiedName":"R"},"name":"R","package":"aurelia-dependency-injection","refersToTypeParameter":true}}]}},"trueType":{"type":"reference","target":{"sourceFileName":"src/container.ts","qualifiedName":"R"},"name":"R","package":"aurelia-dependency-injection","refersToTypeParameter":true},"falseType":{"type":"conditional","checkType":{"type":"reference","target":201,"name":"T","package":"aurelia-dependency-injection","refersToTypeParameter":true},"extendsType":{"type":"reference","target":587,"typeArguments":[{"type":"inferred","name":"R"}],"name":"Factory","package":"aurelia-dependency-injection"},"trueType":{"type":"reflection","declaration":{"id":196,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"container.ts","line":614,"character":8,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L614"}],"signatures":[{"id":197,"name":"__type","variant":"signature","kind":4096,"flags":{},"parameters":[{"id":198,"name":"args","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}}],"type":{"type":"reference","target":{"sourceFileName":"src/container.ts","qualifiedName":"R"},"name":"R","package":"aurelia-dependency-injection","refersToTypeParameter":true}}]}},"falseType":{"type":"conditional","checkType":{"type":"reference","target":201,"name":"T","package":"aurelia-dependency-injection","refersToTypeParameter":true},"extendsType":{"type":"reference","target":498,"typeArguments":[{"type":"inferred","name":"R"}],"name":"Lazy","package":"aurelia-dependency-injection"},"trueType":{"type":"reflection","declaration":{"id":199,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"container.ts","line":616,"character":10,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L616"}],"signatures":[{"id":200,"name":"__type","variant":"signature","kind":4096,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/container.ts","qualifiedName":"R"},"name":"R","package":"aurelia-dependency-injection","refersToTypeParameter":true}}]}},"falseType":{"type":"conditional","checkType":{"type":"reference","target":201,"name":"T","package":"aurelia-dependency-injection","refersToTypeParameter":true},"extendsType":{"type":"reference","target":608,"typeArguments":[{"type":"inferred","name":"R"}],"name":"NewInstance","package":"aurelia-dependency-injection"},"trueType":{"type":"reference","target":{"sourceFileName":"src/container.ts","qualifiedName":"R"},"name":"R","package":"aurelia-dependency-injection","refersToTypeParameter":true},"falseType":{"type":"conditional","checkType":{"type":"reference","target":201,"name":"T","package":"aurelia-dependency-injection","refersToTypeParameter":true},"extendsType":{"type":"reference","target":542,"typeArguments":[{"type":"inferred","name":"R"}],"name":"Optional","package":"aurelia-dependency-injection"},"trueType":{"type":"union","types":[{"type":"reference","target":{"sourceFileName":"src/container.ts","qualifiedName":"R"},"name":"R","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"literal","value":null}]},"falseType":{"type":"conditional","checkType":{"type":"reference","target":201,"name":"T","package":"aurelia-dependency-injection","refersToTypeParameter":true},"extendsType":{"type":"reference","target":521,"typeArguments":[{"type":"inferred","name":"R"}],"name":"All","package":"aurelia-dependency-injection"},"trueType":{"type":"array","elementType":{"type":"reference","target":{"sourceFileName":"src/container.ts","qualifiedName":"R"},"name":"R","package":"aurelia-dependency-injection","refersToTypeParameter":true}},"falseType":{"type":"conditional","checkType":{"type":"reference","target":201,"name":"T","package":"aurelia-dependency-injection","refersToTypeParameter":true},"extendsType":{"type":"reference","target":566,"typeArguments":[{"type":"inferred","name":"R"}],"name":"Parent","package":"aurelia-dependency-injection"},"trueType":{"type":"union","types":[{"type":"reference","target":{"sourceFileName":"src/container.ts","qualifiedName":"R"},"name":"R","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"literal","value":null}]},"falseType":{"type":"conditional","checkType":{"type":"reference","target":201,"name":"T","package":"aurelia-dependency-injection","refersToTypeParameter":true},"extendsType":{"type":"tuple","elements":[{"type":"inferred","name":"T1"},{"type":"rest","elementType":{"type":"inferred","name":"T2"}}]},"trueType":{"type":"tuple","elements":[{"type":"reference","target":192,"typeArguments":[{"type":"reference","target":{"sourceFileName":"src/container.ts","qualifiedName":"T1"},"name":"T1","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"ResolvedValue","package":"aurelia-dependency-injection"},{"type":"rest","elementType":{"type":"reference","target":192,"typeArguments":[{"type":"unknown","name":"..."}],"name":"ResolvedValue","package":"aurelia-dependency-injection"}}]},"falseType":{"type":"reference","target":201,"name":"T","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}}}}}}}},{"id":454,"name":"StrategyFunctor","variant":"declaration","kind":2097152,"flags":{},"sources":[{"fileName":"resolvers.ts","line":55,"character":12,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L55"}],"typeParameters":[{"id":460,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":461,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":460,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":460,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":462,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":460,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":460,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"type":{"type":"reflection","declaration":{"id":455,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"resolvers.ts","line":59,"character":6,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L59"}],"signatures":[{"id":456,"name":"__type","variant":"signature","kind":4096,"flags":{},"parameters":[{"id":457,"name":"container","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":458,"name":"ctor","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":460,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":461,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":462,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":459,"name":"strategyResolver","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"reference","target":461,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true}}]}}},{"id":366,"name":"all","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"resolvers.ts","line":551,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L551"}],"signatures":[{"id":367,"name":"all","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies the dependency should load all instances of the given\r\nkey."}]},"sources":[{"fileName":"resolvers.ts","line":551,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L551"}],"typeParameters":[{"id":368,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":369,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":368,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":370,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":368,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":371,"name":"keyValue","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"reflection","declaration":{"id":372,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"resolvers.ts","line":557,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L557"}],"signatures":[{"id":373,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"resolvers.ts","line":557,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L557"}],"parameters":[{"id":374,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"intersection","types":[{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":368,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":369,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":370,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"},{"type":"reflection","declaration":{"id":375,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":376,"name":"inject","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"resolvers.ts","line":558,"character":52,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L558"}],"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":370,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}}],"groups":[{"title":"Properties","children":[376]}],"sources":[{"fileName":"resolvers.ts","line":558,"character":50,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L558"}]}}]}},{"id":377,"name":"_key","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}},{"id":378,"name":"index","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"intrinsic","name":"void"}}]}}}]},{"id":202,"name":"autoinject","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"injection.ts","line":16,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/injection.ts#L16"}],"signatures":[{"id":203,"name":"autoinject","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Directs the TypeScript transpiler to write-out type metadata for\r\nthe decorated class."}]},"sources":[{"fileName":"injection.ts","line":16,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/injection.ts#L16"}],"typeParameters":[{"id":204,"name":"TPotential","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":205,"name":"potentialTarget","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":204,"name":"TPotential","package":"aurelia-dependency-injection","refersToTypeParameter":true}}],"type":{"type":"conditional","checkType":{"type":"reference","target":204,"name":"TPotential","package":"aurelia-dependency-injection","refersToTypeParameter":true},"extendsType":{"type":"reference","target":215,"name":"Injectable","package":"aurelia-dependency-injection"},"trueType":{"type":"intrinsic","name":"void"},"falseType":{"type":"reflection","declaration":{"id":206,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"injection.ts","line":18,"character":42,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/injection.ts#L18"}],"signatures":[{"id":207,"name":"__type","variant":"signature","kind":4096,"flags":{},"parameters":[{"id":208,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":215,"name":"Injectable","package":"aurelia-dependency-injection"}}],"type":{"type":"intrinsic","name":"void"}}]}}}}]},{"id":402,"name":"factory","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"resolvers.ts","line":609,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L609"}],"signatures":[{"id":403,"name":"factory","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies the dependency to create a factory method, that can\r\naccept optional arguments"}]},"sources":[{"fileName":"resolvers.ts","line":609,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L609"}],"typeParameters":[{"id":404,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":405,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":404,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":406,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":404,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":407,"name":"keyValue","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"reflection","declaration":{"id":408,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"resolvers.ts","line":615,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L615"}],"signatures":[{"id":409,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"resolvers.ts","line":615,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L615"}],"parameters":[{"id":410,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"intersection","types":[{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":404,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":405,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":406,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"},{"type":"reflection","declaration":{"id":411,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":412,"name":"inject","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"resolvers.ts","line":616,"character":52,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L616"}],"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":406,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}}],"groups":[{"title":"Properties","children":[412]}],"sources":[{"fileName":"resolvers.ts","line":616,"character":50,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L616"}]}}]}},{"id":413,"name":"_key","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}},{"id":414,"name":"index","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"intrinsic","name":"void"}}]}}}]},{"id":344,"name":"getDecoratorDependencies","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"resolvers.ts","line":517,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L517"}],"signatures":[{"id":345,"name":"getDecoratorDependencies","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used by parameter decorators to call autoinject for the target and retrieve\r\nthe target's inject property."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns the target's own inject property."}]}]},"sources":[{"fileName":"resolvers.ts","line":517,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L517"}],"typeParameters":[{"id":346,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":347,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":346,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":348,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":346,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":349,"name":"target","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The target class."}]},"type":{"type":"intersection","types":[{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":346,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":347,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":348,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"},{"type":"reflection","declaration":{"id":350,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":351,"name":"inject","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"resolvers.ts","line":521,"character":52,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L521"}],"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":348,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}}],"groups":[{"title":"Properties","children":[351]}],"sources":[{"fileName":"resolvers.ts","line":521,"character":50,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L521"}]}}]}}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":348,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}]}}]},{"id":209,"name":"inject","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"injection.ts","line":43,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/injection.ts#L43"}],"signatures":[{"id":210,"name":"inject","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies the dependencies that should be injected by the DI Container into the decorated class/function."}]},"sources":[{"fileName":"injection.ts","line":43,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/injection.ts#L43"}],"typeParameters":[{"id":211,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":212,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":211,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":213,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":211,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":214,"name":"rest","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":213,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}}],"type":{"type":"intrinsic","name":"any"}}]},{"id":229,"name":"invokeAsFactory","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"invokers.ts","line":21,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/invokers.ts#L21"}],"signatures":[{"id":230,"name":"invokeAsFactory","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies that the decorated item should be called as a factory\r\nfunction, rather than a constructor."}]},"sources":[{"fileName":"invokers.ts","line":21,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/invokers.ts#L21"}],"typeParameters":[{"id":231,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":232,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"}},{"id":233,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]}}],"parameters":[{"id":234,"name":"potentialTarget","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":231,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":232,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":233,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"union","types":[{"type":"intrinsic","name":"void"},{"type":"reflection","declaration":{"id":235,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"invokers.ts","line":23,"character":11,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/invokers.ts#L23"}],"signatures":[{"id":236,"name":"__type","variant":"signature","kind":4096,"flags":{},"parameters":[{"id":237,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":231,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":232,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":233,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"intrinsic","name":"void"}}]}}]}}]},{"id":220,"name":"invoker","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"invokers.ts","line":9,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/invokers.ts#L9"}],"signatures":[{"id":221,"name":"invoker","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies a custom Invoker for the decorated item."}]},"sources":[{"fileName":"invokers.ts","line":9,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/invokers.ts#L9"}],"typeParameters":[{"id":222,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":223,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"}},{"id":224,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]}}],"parameters":[{"id":225,"name":"value","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":238,"typeArguments":[{"type":"reference","target":222,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":223,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":224,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Invoker","package":"aurelia-dependency-injection"}}],"type":{"type":"reflection","declaration":{"id":226,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"invokers.ts","line":11,"character":3,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/invokers.ts#L11"}],"signatures":[{"id":227,"name":"__type","variant":"signature","kind":4096,"flags":{},"parameters":[{"id":228,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":222,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":223,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":224,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"intrinsic","name":"void"}}]}}}]},{"id":352,"name":"lazy","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"resolvers.ts","line":531,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L531"}],"signatures":[{"id":353,"name":"lazy","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies the dependency should be lazy loaded"}]},"sources":[{"fileName":"resolvers.ts","line":531,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L531"}],"typeParameters":[{"id":354,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":355,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":354,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":356,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":354,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":357,"name":"keyValue","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"reflection","declaration":{"id":358,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"resolvers.ts","line":537,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L537"}],"signatures":[{"id":359,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"resolvers.ts","line":537,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L537"}],"parameters":[{"id":360,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":361,"name":"__type","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"resolvers.ts","line":538,"character":12,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L538"}],"signatures":[{"id":362,"name":"new target","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"resolvers.ts","line":538,"character":14,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L538"}],"parameters":[{"id":363,"name":"args","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"reference","target":356,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}],"type":{"type":"union","types":[{"type":"reference","target":354,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":355,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true}]}}]}}},{"id":364,"name":"_key","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}},{"id":365,"name":"index","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"intrinsic","name":"void"}}]}}}]},{"id":415,"name":"newInstance","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"resolvers.ts","line":629,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L629"}],"signatures":[{"id":416,"name":"newInstance","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies the dependency as a new instance. Instances can optionally be registered in the container\r\nunder a different key and/or use dynamic dependencies"}]},"sources":[{"fileName":"resolvers.ts","line":629,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L629"}],"typeParameters":[{"id":417,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":418,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":417,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":419,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":417,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":420,"name":"asKeyOrTarget","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"unknown","name":"PrimitiveOrDependencyCtor & { inject?: TArgs[number][] | undefined; }"}},{"id":421,"name":"dynamicDependencies","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":419,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}}],"type":{"type":"reflection","declaration":{"id":422,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"resolvers.ts","line":638,"character":11,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L638"}],"signatures":[{"id":423,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"resolvers.ts","line":638,"character":11,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L638"}],"parameters":[{"id":424,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":425,"name":"__type","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"resolvers.ts","line":639,"character":14,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L639"}],"signatures":[{"id":426,"name":"new target","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"resolvers.ts","line":639,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L639"}],"parameters":[{"id":427,"name":"args","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"any"}}}],"type":{"type":"intrinsic","name":"any"}}]}}},{"id":428,"name":"_key","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}},{"id":429,"name":"index","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"intrinsic","name":"void"}}]}}}]},{"id":379,"name":"optional","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"resolvers.ts","line":570,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L570"}],"signatures":[{"id":380,"name":"optional","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies the dependency as optional"}]},"sources":[{"fileName":"resolvers.ts","line":570,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L570"}],"typeParameters":[{"id":381,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":382,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":381,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":383,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":381,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":384,"name":"checkParentOrTarget","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"true"}],"type":{"type":"reflection","declaration":{"id":385,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"resolvers.ts","line":576,"character":11,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L576"}],"signatures":[{"id":386,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"resolvers.ts","line":576,"character":11,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L576"}],"parameters":[{"id":387,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"intersection","types":[{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":381,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":382,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":383,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"},{"type":"reflection","declaration":{"id":388,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":389,"name":"inject","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"resolvers.ts","line":577,"character":54,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L577"}],"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":383,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}}],"groups":[{"title":"Properties","children":[389]}],"sources":[{"fileName":"resolvers.ts","line":577,"character":52,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L577"}]}}]}},{"id":390,"name":"_key","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}},{"id":391,"name":"index","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"intrinsic","name":"void"}}]}}}]},{"id":392,"name":"parent","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"resolvers.ts","line":594,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L594"}],"signatures":[{"id":393,"name":"parent","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies the dependency to look at the parent container for\r\nresolution"}]},"sources":[{"fileName":"resolvers.ts","line":594,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L594"}],"typeParameters":[{"id":394,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":395,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":394,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":396,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":394,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":397,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"intersection","types":[{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":394,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":395,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":396,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"},{"type":"reflection","declaration":{"id":398,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":399,"name":"inject","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"resolvers.ts","line":598,"character":52,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L598"}],"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":396,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}}],"groups":[{"title":"Properties","children":[399]}],"sources":[{"fileName":"resolvers.ts","line":598,"character":50,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L598"}]}}]}},{"id":400,"name":"_key","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}},{"id":401,"name":"index","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":274,"name":"registration","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"registrations.ts","line":17,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L17"}],"signatures":[{"id":275,"name":"registration","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies a custom registration strategy for the decorated\r\nclass/function."}]},"sources":[{"fileName":"registrations.ts","line":17,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L17"}],"typeParameters":[{"id":276,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":277,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"}},{"id":278,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]}}],"parameters":[{"id":279,"name":"value","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":301,"typeArguments":[{"type":"reference","target":276,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":277,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":278,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Registration","package":"aurelia-dependency-injection"}}],"type":{"type":"reflection","declaration":{"id":280,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"registrations.ts","line":19,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L19"}],"signatures":[{"id":281,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"registrations.ts","line":19,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L19"}],"parameters":[{"id":282,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":276,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":277,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":278,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"intrinsic","name":"void"}}]}}}]},{"id":1,"name":"resolve","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"container.ts","line":643,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L643"},{"fileName":"container.ts","line":644,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L644"},{"fileName":"container.ts","line":645,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L645"}],"signatures":[{"id":2,"name":"resolve","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Resolve a key, or list of keys based on the current container."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```ts\r\nimport { resolve } from 'aurelia-framework';\r\n// or\r\n// import { Container, resolve } from 'aurelia-dependency-injection';\r\n\r\nclass MyCustomElement {\r\n someService = resolve(MyService);\r\n}\r\n```"}]}]},"sources":[{"fileName":"container.ts","line":643,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L643"}],"typeParameters":[{"id":3,"name":"K","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"}}],"parameters":[{"id":4,"name":"key","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":3,"name":"K","package":"aurelia-dependency-injection","refersToTypeParameter":true}}],"type":{"type":"reference","target":192,"typeArguments":[{"type":"reference","target":3,"name":"K","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"ResolvedValue","package":"aurelia-dependency-injection"}},{"id":5,"name":"resolve","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":644,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/container.ts#L644"}],"typeParameters":[{"id":6,"name":"K","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"array","elementType":{"type":"intrinsic","name":"any"}}}],"parameters":[{"id":7,"name":"keys","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"reference","target":6,"name":"K","package":"aurelia-dependency-injection","refersToTypeParameter":true}}],"type":{"type":"reference","target":192,"typeArguments":[{"type":"reference","target":6,"name":"K","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"ResolvedValue","package":"aurelia-dependency-injection"}}]},{"id":430,"name":"resolver","variant":"declaration","kind":64,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Indicates that the decorated class/object is a custom resolver."}]},"children":[{"id":432,"name":"decorates","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"resolvers.ts","line":19,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L19"}],"type":{"type":"reflection","declaration":{"id":433,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"resolvers.ts","line":19,"character":14,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L19"}],"signatures":[{"id":434,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"resolvers.ts","line":19,"character":14,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L19"}],"parameters":[{"id":435,"name":"key","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"predicate","name":"key","asserts":false,"targetType":{"type":"reflection","declaration":{"id":436,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":437,"name":"get","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"resolvers.ts","line":19,"character":37,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L19"}],"signatures":[{"id":438,"name":"get","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"resolvers.ts","line":19,"character":37,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L19"}],"parameters":[{"id":439,"name":"container","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":440,"name":"key","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"any"}}]}],"groups":[{"title":"Methods","children":[437]}],"sources":[{"fileName":"resolvers.ts","line":19,"character":35,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L19"}]}}}}]}}}],"groups":[{"title":"Properties","children":[432]}],"sources":[{"fileName":"resolvers.ts","line":18,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L18"}],"signatures":[{"id":431,"name":"resolver","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"resolvers.ts","line":20,"character":5,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/resolvers.ts#L20"}],"type":{"type":"intrinsic","name":"any"}}]},{"id":292,"name":"singleton","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"registrations.ts","line":37,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L37"},{"fileName":"registrations.ts","line":38,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L38"},{"fileName":"registrations.ts","line":40,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L40"}],"signatures":[{"id":293,"name":"singleton","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies to register the decorated item with a \"singleton\"\r\nlifetime."}]},"sources":[{"fileName":"registrations.ts","line":37,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L37"}],"parameters":[{"id":294,"name":"registerInChild","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"intrinsic","name":"any"}},{"id":295,"name":"singleton","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"registrations.ts","line":38,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L38"}],"typeParameters":[{"id":296,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":297,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"}},{"id":298,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]}}],"parameters":[{"id":299,"name":"key","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":296,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":297,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":298,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":300,"name":"registerInChild","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"intrinsic","name":"any"}}]},{"id":283,"name":"transient","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"registrations.ts","line":28,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L28"}],"signatures":[{"id":284,"name":"transient","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies to register the decorated item with a \"transient\"\r\nlifetime."}]},"sources":[{"fileName":"registrations.ts","line":28,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L28"}],"typeParameters":[{"id":285,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":286,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"}},{"id":287,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]}}],"parameters":[{"id":288,"name":"key","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":285,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":286,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":287,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reflection","declaration":{"id":289,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"registrations.ts","line":19,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L19"}],"signatures":[{"id":290,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"registrations.ts","line":19,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/ccac164c511274a5b37db441cdfea924c92b37fd/src/registrations.ts#L19"}],"parameters":[{"id":291,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":285,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":286,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":287,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"intrinsic","name":"void"}}]}}}]}],"groups":[{"title":"Enumerations","children":[446]},{"title":"Classes","children":[521,34,587,253,9,498,608,542,566,326,479,310]},{"title":"Interfaces","children":[28,238,301,441,463]},{"title":"Type Aliases","children":[453,215,192,454]},{"title":"Functions","children":[366,202,402,344,209,229,220,352,415,379,392,274,1,430,292,283]}],"packageName":"aurelia-dependency-injection","readme":[{"kind":"text","text":"

\n \n \"Aurelia\"\n \n

\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![npm Version](https://img.shields.io/npm/v/aurelia-dependency-injection.svg)](https://www.npmjs.com/package/aurelia-dependency-injection)\n![ci](https://github.com/aurelia/dependency-injection/actions/workflows/main.yml/badge.svg)\n[![Discourse status](https://img.shields.io/discourse/https/meta.discourse.org/status.svg)](https://discourse.aurelia.io)\n[![Twitter](https://img.shields.io/twitter/follow/aureliaeffect.svg?style=social&label=Follow)](https://twitter.com/intent/follow?screen_name=aureliaeffect)\n[![Discord Chat](https://img.shields.io/discord/448698263508615178.svg)](https://discord.gg/RBtyM6u)\n\n# aurelia-dependency-injection\n\nThis library is part of the [Aurelia](http://www.aurelia.io/) platform and contains a lightweight, extensible dependency injection container for JavaScript.\n\n## Documentation\n\nYou can read documentation on dependency injection [here](https://aurelia.io/docs/fundamentals/dependency-injection/). If you would like to help improve this documentation, the source for the above can be found in the doc folder within this repository.\n\n## Platform Support\n\nThis library can be used in the **browser** as well as on the **server**.\n\n## Reporting Issues\n\nPlease refer to the [issue template]("},{"kind":"relative-link","text":"ISSUE_TEMPLATE.md","target":2},{"kind":"text","text":"). Accompany any bug report with a demo of the issue using a [runnable Gist](https://gist.run/?id=381fdb1a4b0865a4c25026187db865ce).\n\n## Building\n\n"},{"kind":"code","text":"```shell\nnpm run build\n```"},{"kind":"text","text":"\n\n## Tests\n\n"},{"kind":"code","text":"```shell\nnpm run test\n```"},{"kind":"text","text":"\n\n## Developing\n\nRun the tests in watch mode:\n\n"},{"kind":"code","text":"```shell\nnpm run develop\n```"},{"kind":"text","text":"\n\n## Publishing\n\n1. Bump the version\n \n "},{"kind":"code","text":"```shell\n npm run bump-version [ | major | minor | patch]\n ```"},{"kind":"text","text":"\n\n2. Prepare the release (run tests, run build, docs, release notes)\n \n "},{"kind":"code","text":"```shell\n npm run prepare-release\n ```"},{"kind":"text","text":"\n\n3. Commit, tag, npm publish (not automated)"}],"symbolIdMap":{"0":{"sourceFileName":"src/aurelia-dependency-injection.ts","qualifiedName":""},"1":{"sourceFileName":"src/container.ts","qualifiedName":"resolve"},"2":{"sourceFileName":"src/container.ts","qualifiedName":"resolve"},"3":{"sourceFileName":"src/container.ts","qualifiedName":"K"},"4":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"5":{"sourceFileName":"src/container.ts","qualifiedName":"resolve"},"6":{"sourceFileName":"src/container.ts","qualifiedName":"K"},"7":{"sourceFileName":"src/container.ts","qualifiedName":"keys"},"9":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler"},"10":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.__constructor"},"11":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler"},"12":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.TBase"},"13":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.TImpl"},"14":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.TArgs"},"15":{"sourceFileName":"src/container.ts","qualifiedName":"fn"},"16":{"sourceFileName":"src/container.ts","qualifiedName":"invoker"},"17":{"sourceFileName":"src/container.ts","qualifiedName":"dependencies"},"18":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.fn"},"19":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.invoker"},"20":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.dependencies"},"21":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.invoke"},"22":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.invoke"},"23":{"sourceFileName":"src/container.ts","qualifiedName":"container"},"24":{"sourceFileName":"src/container.ts","qualifiedName":"dynamicDependencies"},"25":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.TBase"},"26":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.TImpl"},"27":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.TArgs"},"28":{"sourceFileName":"src/container.ts","qualifiedName":"ContainerConfiguration"},"29":{"sourceFileName":"src/container.ts","qualifiedName":"ContainerConfiguration.onHandlerCreated"},"30":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"31":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"32":{"sourceFileName":"src/container.ts","qualifiedName":"handler"},"33":{"sourceFileName":"src/container.ts","qualifiedName":"ContainerConfiguration.handlers"},"34":{"sourceFileName":"src/container.ts","qualifiedName":"Container"},"35":{"sourceFileName":"src/container.ts","qualifiedName":"Container.instance"},"36":{"sourceFileName":"src/container.ts","qualifiedName":"Container.__constructor"},"37":{"sourceFileName":"src/container.ts","qualifiedName":"Container"},"38":{"sourceFileName":"src/container.ts","qualifiedName":"configuration"},"39":{"sourceFileName":"src/container.ts","qualifiedName":"Container.parent"},"40":{"sourceFileName":"src/container.ts","qualifiedName":"Container.root"},"48":{"sourceFileName":"src/container.ts","qualifiedName":"Container.makeGlobal"},"49":{"sourceFileName":"src/container.ts","qualifiedName":"Container.makeGlobal"},"50":{"sourceFileName":"src/container.ts","qualifiedName":"Container.setHandlerCreatedCallback"},"51":{"sourceFileName":"src/container.ts","qualifiedName":"Container.setHandlerCreatedCallback"},"52":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"53":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"54":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"55":{"sourceFileName":"src/container.ts","qualifiedName":"onHandlerCreated"},"56":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"57":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"58":{"sourceFileName":"src/container.ts","qualifiedName":"handler"},"59":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerInstance"},"60":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerInstance"},"61":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"62":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"63":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"64":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"65":{"sourceFileName":"src/container.ts","qualifiedName":"instance"},"66":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerSingleton"},"67":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerSingleton"},"68":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"69":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"70":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"71":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"72":{"sourceFileName":"src/container.ts","qualifiedName":"fn"},"73":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerSingleton"},"74":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"75":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"76":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"77":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"78":{"sourceFileName":"src/container.ts","qualifiedName":"fn"},"79":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerTransient"},"80":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerTransient"},"81":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"82":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"83":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"84":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"85":{"sourceFileName":"src/container.ts","qualifiedName":"fn"},"86":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerTransient"},"87":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"88":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"89":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"90":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"91":{"sourceFileName":"src/container.ts","qualifiedName":"fn"},"92":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerHandler"},"93":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerHandler"},"94":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"95":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"96":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"97":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"98":{"sourceFileName":"src/container.ts","qualifiedName":"handler"},"99":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"100":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"101":{"sourceFileName":"src/container.ts","qualifiedName":"container"},"102":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"103":{"sourceFileName":"src/container.ts","qualifiedName":"resolver"},"104":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerAlias"},"105":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerAlias"},"106":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"107":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"108":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"109":{"sourceFileName":"src/container.ts","qualifiedName":"originalKey"},"110":{"sourceFileName":"src/container.ts","qualifiedName":"aliasKey"},"111":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerResolver"},"112":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerResolver"},"113":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"114":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"115":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"116":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"117":{"sourceFileName":"src/container.ts","qualifiedName":"resolver"},"118":{"sourceFileName":"src/container.ts","qualifiedName":"Container.autoRegister"},"119":{"sourceFileName":"src/container.ts","qualifiedName":"Container.autoRegister"},"120":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"121":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"122":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"123":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"124":{"sourceFileName":"src/container.ts","qualifiedName":"fn"},"125":{"sourceFileName":"src/container.ts","qualifiedName":"Container.autoRegister"},"126":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"127":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"128":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"129":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"130":{"sourceFileName":"src/container.ts","qualifiedName":"fn"},"131":{"sourceFileName":"src/container.ts","qualifiedName":"Container.autoRegisterAll"},"132":{"sourceFileName":"src/container.ts","qualifiedName":"Container.autoRegisterAll"},"133":{"sourceFileName":"src/container.ts","qualifiedName":"fns"},"134":{"sourceFileName":"src/container.ts","qualifiedName":"Container.unregister"},"135":{"sourceFileName":"src/container.ts","qualifiedName":"Container.unregister"},"136":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"137":{"sourceFileName":"src/container.ts","qualifiedName":"Container.hasResolver"},"138":{"sourceFileName":"src/container.ts","qualifiedName":"Container.hasResolver"},"139":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"140":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"141":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"142":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"143":{"sourceFileName":"src/container.ts","qualifiedName":"checkParent"},"144":{"sourceFileName":"src/container.ts","qualifiedName":"Container.getResolver"},"145":{"sourceFileName":"src/container.ts","qualifiedName":"Container.getResolver"},"146":{"sourceFileName":"src/container.ts","qualifiedName":"TStrategyKey"},"147":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"148":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"149":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"150":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"151":{"sourceFileName":"src/container.ts","qualifiedName":"Container.get"},"152":{"sourceFileName":"src/container.ts","qualifiedName":"Container.get"},"153":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"154":{"sourceFileName":"src/container.ts","qualifiedName":"TResolver"},"155":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"156":{"sourceFileName":"src/container.ts","qualifiedName":"Container.get"},"157":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"158":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"159":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"160":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"161":{"sourceFileName":"src/container.ts","qualifiedName":"Container.get"},"162":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"163":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"164":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"165":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"166":{"sourceFileName":"src/container.ts","qualifiedName":"Container._get"},"167":{"sourceFileName":"src/container.ts","qualifiedName":"Container._get"},"168":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"169":{"sourceFileName":"src/container.ts","qualifiedName":"Container.getAll"},"170":{"sourceFileName":"src/container.ts","qualifiedName":"Container.getAll"},"171":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"172":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"173":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"174":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"175":{"sourceFileName":"src/container.ts","qualifiedName":"Container.createChild"},"176":{"sourceFileName":"src/container.ts","qualifiedName":"Container.createChild"},"177":{"sourceFileName":"src/container.ts","qualifiedName":"Container.invoke"},"178":{"sourceFileName":"src/container.ts","qualifiedName":"Container.invoke"},"179":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"180":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"181":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"182":{"sourceFileName":"src/container.ts","qualifiedName":"fn"},"183":{"sourceFileName":"src/container.ts","qualifiedName":"dynamicDependencies"},"184":{"sourceFileName":"src/container.ts","qualifiedName":"Container._createInvocationHandler"},"185":{"sourceFileName":"src/container.ts","qualifiedName":"Container._createInvocationHandler"},"186":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"187":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"188":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"189":{"sourceFileName":"src/container.ts","qualifiedName":"fn"},"190":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"191":{"sourceFileName":"src/container.ts","qualifiedName":"__type.inject"},"192":{"sourceFileName":"src/container.ts","qualifiedName":"ResolvedValue"},"193":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"194":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"195":{"sourceFileName":"src/container.ts","qualifiedName":"args"},"196":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"197":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"198":{"sourceFileName":"src/container.ts","qualifiedName":"args"},"199":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"200":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"201":{"sourceFileName":"src/container.ts","qualifiedName":"T"},"202":{"sourceFileName":"src/injection.ts","qualifiedName":"autoinject"},"203":{"sourceFileName":"src/injection.ts","qualifiedName":"autoinject"},"204":{"sourceFileName":"src/injection.ts","qualifiedName":"TPotential"},"205":{"sourceFileName":"src/injection.ts","qualifiedName":"potentialTarget"},"206":{"sourceFileName":"src/injection.ts","qualifiedName":"__type"},"207":{"sourceFileName":"src/injection.ts","qualifiedName":"__type"},"208":{"sourceFileName":"src/injection.ts","qualifiedName":"target"},"209":{"sourceFileName":"src/injection.ts","qualifiedName":"inject"},"210":{"sourceFileName":"src/injection.ts","qualifiedName":"inject"},"211":{"sourceFileName":"src/injection.ts","qualifiedName":"TBase"},"212":{"sourceFileName":"src/injection.ts","qualifiedName":"TImpl"},"213":{"sourceFileName":"src/injection.ts","qualifiedName":"TArgs"},"214":{"sourceFileName":"src/injection.ts","qualifiedName":"rest"},"215":{"sourceFileName":"src/injection.ts","qualifiedName":"Injectable"},"216":{"sourceFileName":"src/injection.ts","qualifiedName":"__type"},"217":{"sourceFileName":"src/injection.ts","qualifiedName":"__type.inject"},"218":{"sourceFileName":"src/injection.ts","qualifiedName":"__type"},"219":{"sourceFileName":"src/injection.ts","qualifiedName":"__type"},"220":{"sourceFileName":"src/invokers.ts","qualifiedName":"invoker"},"221":{"sourceFileName":"src/invokers.ts","qualifiedName":"invoker"},"222":{"sourceFileName":"src/invokers.ts","qualifiedName":"TBase"},"223":{"sourceFileName":"src/invokers.ts","qualifiedName":"TImpl"},"224":{"sourceFileName":"src/invokers.ts","qualifiedName":"TArgs"},"225":{"sourceFileName":"src/invokers.ts","qualifiedName":"value"},"226":{"sourceFileName":"src/invokers.ts","qualifiedName":"__type"},"227":{"sourceFileName":"src/invokers.ts","qualifiedName":"__type"},"228":{"sourceFileName":"src/invokers.ts","qualifiedName":"target"},"229":{"sourceFileName":"src/invokers.ts","qualifiedName":"invokeAsFactory"},"230":{"sourceFileName":"src/invokers.ts","qualifiedName":"invokeAsFactory"},"231":{"sourceFileName":"src/invokers.ts","qualifiedName":"TBase"},"232":{"sourceFileName":"src/invokers.ts","qualifiedName":"TImpl"},"233":{"sourceFileName":"src/invokers.ts","qualifiedName":"TArgs"},"234":{"sourceFileName":"src/invokers.ts","qualifiedName":"potentialTarget"},"235":{"sourceFileName":"src/invokers.ts","qualifiedName":"__type"},"236":{"sourceFileName":"src/invokers.ts","qualifiedName":"__type"},"237":{"sourceFileName":"src/invokers.ts","qualifiedName":"target"},"238":{"sourceFileName":"src/invokers.ts","qualifiedName":"Invoker"},"239":{"sourceFileName":"src/invokers.ts","qualifiedName":"Invoker.invoke"},"240":{"sourceFileName":"src/invokers.ts","qualifiedName":"Invoker.invoke"},"241":{"sourceFileName":"src/invokers.ts","qualifiedName":"container"},"242":{"sourceFileName":"src/invokers.ts","qualifiedName":"fn"},"243":{"sourceFileName":"src/invokers.ts","qualifiedName":"dependencies"},"244":{"sourceFileName":"src/invokers.ts","qualifiedName":"Invoker.invokeWithDynamicDependencies"},"245":{"sourceFileName":"src/invokers.ts","qualifiedName":"Invoker.invokeWithDynamicDependencies"},"246":{"sourceFileName":"src/invokers.ts","qualifiedName":"container"},"247":{"sourceFileName":"src/invokers.ts","qualifiedName":"fn"},"248":{"sourceFileName":"src/invokers.ts","qualifiedName":"staticDependencies"},"249":{"sourceFileName":"src/invokers.ts","qualifiedName":"dynamicDependencies"},"250":{"sourceFileName":"src/invokers.ts","qualifiedName":"Invoker.TBase"},"251":{"sourceFileName":"src/invokers.ts","qualifiedName":"Invoker.TImpl"},"252":{"sourceFileName":"src/invokers.ts","qualifiedName":"Invoker.TArgs"},"253":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker"},"254":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.instance"},"257":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.TBase"},"258":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.TImpl"},"259":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.TArgs"},"260":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.invoke"},"261":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.invoke"},"262":{"sourceFileName":"src/invokers.ts","qualifiedName":"container"},"263":{"sourceFileName":"src/invokers.ts","qualifiedName":"fn"},"264":{"sourceFileName":"src/invokers.ts","qualifiedName":"dependencies"},"265":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.invokeWithDynamicDependencies"},"266":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.invokeWithDynamicDependencies"},"267":{"sourceFileName":"src/invokers.ts","qualifiedName":"container"},"268":{"sourceFileName":"src/invokers.ts","qualifiedName":"fn"},"269":{"sourceFileName":"src/invokers.ts","qualifiedName":"staticDependencies"},"270":{"sourceFileName":"src/invokers.ts","qualifiedName":"dynamicDependencies"},"271":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.TBase"},"272":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.TImpl"},"273":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.TArgs"},"274":{"sourceFileName":"src/registrations.ts","qualifiedName":"registration"},"275":{"sourceFileName":"src/registrations.ts","qualifiedName":"registration"},"276":{"sourceFileName":"src/registrations.ts","qualifiedName":"TBase"},"277":{"sourceFileName":"src/registrations.ts","qualifiedName":"TImpl"},"278":{"sourceFileName":"src/registrations.ts","qualifiedName":"TArgs"},"279":{"sourceFileName":"src/registrations.ts","qualifiedName":"value"},"280":{"sourceFileName":"src/registrations.ts","qualifiedName":"__function"},"281":{"sourceFileName":"src/registrations.ts","qualifiedName":"__function"},"282":{"sourceFileName":"src/registrations.ts","qualifiedName":"target"},"283":{"sourceFileName":"src/registrations.ts","qualifiedName":"transient"},"284":{"sourceFileName":"src/registrations.ts","qualifiedName":"transient"},"285":{"sourceFileName":"src/registrations.ts","qualifiedName":"TBase"},"286":{"sourceFileName":"src/registrations.ts","qualifiedName":"TImpl"},"287":{"sourceFileName":"src/registrations.ts","qualifiedName":"TArgs"},"288":{"sourceFileName":"src/registrations.ts","qualifiedName":"key"},"289":{"sourceFileName":"src/registrations.ts","qualifiedName":"__function"},"290":{"sourceFileName":"src/registrations.ts","qualifiedName":"__function"},"291":{"sourceFileName":"src/registrations.ts","qualifiedName":"target"},"292":{"sourceFileName":"src/registrations.ts","qualifiedName":"singleton"},"293":{"sourceFileName":"src/registrations.ts","qualifiedName":"singleton"},"294":{"sourceFileName":"src/registrations.ts","qualifiedName":"registerInChild"},"295":{"sourceFileName":"src/registrations.ts","qualifiedName":"singleton"},"296":{"sourceFileName":"src/registrations.ts","qualifiedName":"TBase"},"297":{"sourceFileName":"src/registrations.ts","qualifiedName":"TImpl"},"298":{"sourceFileName":"src/registrations.ts","qualifiedName":"TArgs"},"299":{"sourceFileName":"src/registrations.ts","qualifiedName":"key"},"300":{"sourceFileName":"src/registrations.ts","qualifiedName":"registerInChild"},"301":{"sourceFileName":"src/registrations.ts","qualifiedName":"Registration"},"302":{"sourceFileName":"src/registrations.ts","qualifiedName":"Registration.registerResolver"},"303":{"sourceFileName":"src/registrations.ts","qualifiedName":"Registration.registerResolver"},"304":{"sourceFileName":"src/registrations.ts","qualifiedName":"container"},"305":{"sourceFileName":"src/registrations.ts","qualifiedName":"key"},"306":{"sourceFileName":"src/registrations.ts","qualifiedName":"fn"},"307":{"sourceFileName":"src/registrations.ts","qualifiedName":"Registration.TBase"},"308":{"sourceFileName":"src/registrations.ts","qualifiedName":"Registration.TImpl"},"309":{"sourceFileName":"src/registrations.ts","qualifiedName":"Registration.TArgs"},"310":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration"},"311":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration.__constructor"},"312":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration"},"313":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration.TBase"},"314":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration.TImpl"},"315":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration.TArgs"},"316":{"sourceFileName":"src/registrations.ts","qualifiedName":"key"},"318":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration.registerResolver"},"319":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration.registerResolver"},"320":{"sourceFileName":"src/registrations.ts","qualifiedName":"container"},"321":{"sourceFileName":"src/registrations.ts","qualifiedName":"key"},"322":{"sourceFileName":"src/registrations.ts","qualifiedName":"fn"},"323":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration.TBase"},"324":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration.TImpl"},"325":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration.TArgs"},"326":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration"},"327":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration.__constructor"},"328":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration"},"329":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration.TBase"},"330":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration.TImpl"},"331":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration.TArgs"},"332":{"sourceFileName":"src/registrations.ts","qualifiedName":"keyOrRegisterInChild"},"333":{"sourceFileName":"src/registrations.ts","qualifiedName":"registerInChild"},"336":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration.registerResolver"},"337":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration.registerResolver"},"338":{"sourceFileName":"src/registrations.ts","qualifiedName":"container"},"339":{"sourceFileName":"src/registrations.ts","qualifiedName":"key"},"340":{"sourceFileName":"src/registrations.ts","qualifiedName":"fn"},"341":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration.TBase"},"342":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration.TImpl"},"343":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration.TArgs"},"344":{"sourceFileName":"src/resolvers.ts","qualifiedName":"getDecoratorDependencies"},"345":{"sourceFileName":"src/resolvers.ts","qualifiedName":"getDecoratorDependencies"},"346":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"347":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"348":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"349":{"sourceFileName":"src/resolvers.ts","qualifiedName":"target"},"350":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"351":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type.inject"},"352":{"sourceFileName":"src/resolvers.ts","qualifiedName":"lazy"},"353":{"sourceFileName":"src/resolvers.ts","qualifiedName":"lazy"},"354":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"355":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"356":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"357":{"sourceFileName":"src/resolvers.ts","qualifiedName":"keyValue"},"358":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__function"},"359":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__function"},"360":{"sourceFileName":"src/resolvers.ts","qualifiedName":"target"},"361":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"362":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"363":{"sourceFileName":"src/resolvers.ts","qualifiedName":"args"},"364":{"sourceFileName":"src/resolvers.ts","qualifiedName":"_key"},"365":{"sourceFileName":"src/resolvers.ts","qualifiedName":"index"},"366":{"sourceFileName":"src/resolvers.ts","qualifiedName":"all"},"367":{"sourceFileName":"src/resolvers.ts","qualifiedName":"all"},"368":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"369":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"370":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"371":{"sourceFileName":"src/resolvers.ts","qualifiedName":"keyValue"},"372":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__function"},"373":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__function"},"374":{"sourceFileName":"src/resolvers.ts","qualifiedName":"target"},"375":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"376":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type.inject"},"377":{"sourceFileName":"src/resolvers.ts","qualifiedName":"_key"},"378":{"sourceFileName":"src/resolvers.ts","qualifiedName":"index"},"379":{"sourceFileName":"src/resolvers.ts","qualifiedName":"optional"},"380":{"sourceFileName":"src/resolvers.ts","qualifiedName":"optional"},"381":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"382":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"383":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"384":{"sourceFileName":"src/resolvers.ts","qualifiedName":"checkParentOrTarget"},"385":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__function"},"386":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__function"},"387":{"sourceFileName":"src/resolvers.ts","qualifiedName":"target"},"388":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"389":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type.inject"},"390":{"sourceFileName":"src/resolvers.ts","qualifiedName":"_key"},"391":{"sourceFileName":"src/resolvers.ts","qualifiedName":"index"},"392":{"sourceFileName":"src/resolvers.ts","qualifiedName":"parent"},"393":{"sourceFileName":"src/resolvers.ts","qualifiedName":"parent"},"394":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"395":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"396":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"397":{"sourceFileName":"src/resolvers.ts","qualifiedName":"target"},"398":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"399":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type.inject"},"400":{"sourceFileName":"src/resolvers.ts","qualifiedName":"_key"},"401":{"sourceFileName":"src/resolvers.ts","qualifiedName":"index"},"402":{"sourceFileName":"src/resolvers.ts","qualifiedName":"factory"},"403":{"sourceFileName":"src/resolvers.ts","qualifiedName":"factory"},"404":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"405":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"406":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"407":{"sourceFileName":"src/resolvers.ts","qualifiedName":"keyValue"},"408":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__function"},"409":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__function"},"410":{"sourceFileName":"src/resolvers.ts","qualifiedName":"target"},"411":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"412":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type.inject"},"413":{"sourceFileName":"src/resolvers.ts","qualifiedName":"_key"},"414":{"sourceFileName":"src/resolvers.ts","qualifiedName":"index"},"415":{"sourceFileName":"src/resolvers.ts","qualifiedName":"newInstance"},"416":{"sourceFileName":"src/resolvers.ts","qualifiedName":"newInstance"},"417":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"418":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"419":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"420":{"sourceFileName":"src/resolvers.ts","qualifiedName":"asKeyOrTarget"},"421":{"sourceFileName":"src/resolvers.ts","qualifiedName":"dynamicDependencies"},"422":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__function"},"423":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__function"},"424":{"sourceFileName":"src/resolvers.ts","qualifiedName":"target"},"425":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"426":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"427":{"sourceFileName":"src/resolvers.ts","qualifiedName":"args"},"428":{"sourceFileName":"src/resolvers.ts","qualifiedName":"_key"},"429":{"sourceFileName":"src/resolvers.ts","qualifiedName":"index"},"430":{"sourceFileName":"src/resolvers.ts","qualifiedName":"resolver"},"431":{"sourceFileName":"src/resolvers.ts","qualifiedName":"resolver"},"432":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type.decorates"},"433":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"434":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"435":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"436":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"437":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type.get"},"438":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type.get"},"439":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"440":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"441":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Resolver"},"442":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Resolver.get"},"443":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Resolver.get"},"444":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"445":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"446":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Strategy"},"447":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Strategy.instance"},"448":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Strategy.singleton"},"449":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Strategy.transient"},"450":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Strategy.function"},"451":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Strategy.array"},"452":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Strategy.alias"},"453":{"sourceFileName":"src/resolvers.ts","qualifiedName":"IStrategy"},"454":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyFunctor"},"455":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"456":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"457":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"458":{"sourceFileName":"src/resolvers.ts","qualifiedName":"ctor"},"459":{"sourceFileName":"src/resolvers.ts","qualifiedName":"strategyResolver"},"460":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"461":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"462":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"463":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyState"},"464":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyState.0"},"465":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyState.1"},"466":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyState.2"},"467":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyState.3"},"468":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyState.4"},"469":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"470":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type.get"},"471":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"472":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"473":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"474":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"475":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyState.5"},"476":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyState.TBase"},"477":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyState.TImpl"},"478":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyState.TArgs"},"479":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver"},"480":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.__constructor"},"481":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver"},"482":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.TBase"},"483":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.TImpl"},"484":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.TArgs"},"485":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.TStrategyKey"},"486":{"sourceFileName":"src/resolvers.ts","qualifiedName":"strategy"},"487":{"sourceFileName":"src/resolvers.ts","qualifiedName":"state"},"488":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.strategy"},"489":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.state"},"490":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.get"},"491":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.get"},"492":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"493":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"494":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.TBase"},"495":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.TImpl"},"496":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.TArgs"},"497":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.TStrategyKey"},"498":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy"},"499":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.of"},"500":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.of"},"501":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"502":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"503":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"504":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"505":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.__constructor"},"506":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy"},"507":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.TBase"},"508":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.TImpl"},"509":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.TArgs"},"510":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"512":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.__resolver_type__"},"513":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.get"},"514":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.get"},"515":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"516":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"517":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"518":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.TBase"},"519":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.TImpl"},"520":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.TArgs"},"521":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All"},"522":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.of"},"523":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.of"},"524":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"525":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"526":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"527":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"528":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.__constructor"},"529":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All"},"530":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.TBase"},"531":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.TImpl"},"532":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.TArgs"},"533":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"535":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.__resolver_type__"},"536":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.get"},"537":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.get"},"538":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"539":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.TBase"},"540":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.TImpl"},"541":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.TArgs"},"542":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional"},"543":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.of"},"544":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.of"},"545":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"546":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"547":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"548":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"549":{"sourceFileName":"src/resolvers.ts","qualifiedName":"checkParent"},"550":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.__constructor"},"551":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional"},"552":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.TBase"},"553":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.TImpl"},"554":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.TArgs"},"555":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"556":{"sourceFileName":"src/resolvers.ts","qualifiedName":"checkParent"},"559":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.__resolver_type__"},"560":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.get"},"561":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.get"},"562":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"563":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.TBase"},"564":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.TImpl"},"565":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.TArgs"},"566":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent"},"567":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.of"},"568":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.of"},"569":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"570":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"571":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"572":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"573":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.__constructor"},"574":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent"},"575":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.TBase"},"576":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.TImpl"},"577":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.TArgs"},"578":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"580":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.__resolver_type__"},"581":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.get"},"582":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.get"},"583":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"584":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.TBase"},"585":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.TImpl"},"586":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.TArgs"},"587":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory"},"588":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.of"},"589":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.of"},"590":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"591":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"592":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"593":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"594":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.__constructor"},"595":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory"},"596":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.TBase"},"597":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.TImpl"},"598":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.TArgs"},"599":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"601":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.__resolver_type__"},"602":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.get"},"603":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.get"},"604":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"605":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.TBase"},"606":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.TImpl"},"607":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.TArgs"},"608":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance"},"609":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.of"},"610":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.of"},"611":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"612":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"613":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"614":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"615":{"sourceFileName":"src/resolvers.ts","qualifiedName":"dynamicDependencies"},"616":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.__constructor"},"617":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance"},"618":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.TBase"},"619":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.TImpl"},"620":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.TArgs"},"621":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"622":{"sourceFileName":"src/resolvers.ts","qualifiedName":"dynamicDependencies"},"626":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.__resolver_type__"},"627":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.get"},"628":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.get"},"629":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"630":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.as"},"631":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.as"},"632":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"633":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.TBase"},"634":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.TImpl"},"635":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.TArgs"}},"files":{"entries":{"1":"src/aurelia-dependency-injection.ts","2":"ISSUE_TEMPLATE.md"},"reflections":{"1":0}}} +{"id":0,"name":"aurelia-dependency-injection","variant":"project","kind":1,"flags":{},"children":[{"id":449,"name":"Strategy","variant":"declaration","kind":8,"flags":{},"children":[{"id":455,"name":"alias","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"resolvers.ts","line":51,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L51"}],"type":{"type":"literal","value":5}},{"id":454,"name":"array","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"resolvers.ts","line":50,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L50"}],"type":{"type":"literal","value":4}},{"id":453,"name":"function","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"resolvers.ts","line":49,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L49"}],"type":{"type":"literal","value":3}},{"id":450,"name":"instance","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"resolvers.ts","line":46,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L46"}],"type":{"type":"literal","value":0}},{"id":451,"name":"singleton","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"resolvers.ts","line":47,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L47"}],"type":{"type":"literal","value":1}},{"id":452,"name":"transient","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"resolvers.ts","line":48,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L48"}],"type":{"type":"literal","value":2}}],"groups":[{"title":"Enumeration Members","children":[455,454,453,450,451,452]}],"sources":[{"fileName":"resolvers.ts","line":45,"character":12,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L45"}]},{"id":524,"name":"All","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to allow functions/classes to specify resolution of all matches to a key."}]},"children":[{"id":531,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"resolvers.ts","line":227,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L227"}],"signatures":[{"id":532,"name":"new All","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an instance of the All class."}]},"sources":[{"fileName":"resolvers.ts","line":227,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L227"}],"typeParameters":[{"id":533,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":534,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":533,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"All.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":535,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":533,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"All.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":536,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to lazily resolve all matches for."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":533,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"All.TBase","refersToTypeParameter":true},{"type":"reference","target":534,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"All.TImpl","refersToTypeParameter":true},{"type":"reference","target":535,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"All.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":524,"typeArguments":[{"type":"reference","target":533,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"All.TBase","refersToTypeParameter":true},{"type":"reference","target":534,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"All.TImpl","refersToTypeParameter":true},{"type":"reference","target":535,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"All.TArgs","refersToTypeParameter":true}],"name":"All","package":"aurelia-dependency-injection"}}]},{"id":538,"name":"__resolver_type__","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"A non existent property to help TS distinguish resolvers\r\n\r\nThis is semi-private, and should not be used by application"}]},"sources":[{"fileName":"resolvers.ts","line":221,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L221"}],"type":{"type":"literal","value":"all"}},{"id":539,"name":"get","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"resolvers.ts","line":237,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L237"}],"signatures":[{"id":540,"name":"get","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to resolve all matching dependencies as an array of\r\ninstances."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns an array of all matching instances."}]}]},"sources":[{"fileName":"resolvers.ts","line":237,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L237"}],"parameters":[{"id":541,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container to resolve from."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}],"type":{"type":"array","elementType":{"type":"reference","target":534,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"All.TImpl","refersToTypeParameter":true}}}]},{"id":525,"name":"of","variant":"declaration","kind":2048,"flags":{"isPublic":true,"isStatic":true},"sources":[{"fileName":"resolvers.ts","line":246,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L246"}],"signatures":[{"id":526,"name":"of","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an All Resolver for the supplied key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns an instance of All for the key."}]}]},"sources":[{"fileName":"resolvers.ts","line":246,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L246"}],"typeParameters":[{"id":527,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":528,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":527,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":529,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":527,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":530,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to resolve all instances for."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":527,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":528,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":529,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":524,"typeArguments":[{"type":"reference","target":527,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":528,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":529,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"All","package":"aurelia-dependency-injection"}}]}],"groups":[{"title":"Constructors","children":[531]},{"title":"Properties","children":[538]},{"title":"Methods","children":[539,525]}],"sources":[{"fileName":"resolvers.ts","line":210,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L210"}],"typeParameters":[{"id":542,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":543,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":533,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"All.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":533,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"All.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":544,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":533,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"All.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":533,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"All.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}]},{"id":34,"name":"Container","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"A lightweight, extensible dependency injection container."}]},"children":[{"id":36,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"container.ts","line":206,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L206"}],"signatures":[{"id":37,"name":"new Container","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an instance of Container."}]},"sources":[{"fileName":"container.ts","line":206,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L206"}],"parameters":[{"id":38,"name":"configuration","variant":"param","kind":32768,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Provides some configuration for the new Container instance."}]},"type":{"type":"reference","target":28,"name":"ContainerConfiguration","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}]},{"id":39,"name":"parent","variant":"declaration","kind":1024,"flags":{"isPublic":true},"comment":{"summary":[{"kind":"text","text":"The parent container in the DI hierarchy."}]},"sources":[{"fileName":"container.ts","line":181,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L181"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}]}},{"id":40,"name":"root","variant":"declaration","kind":1024,"flags":{"isPublic":true},"comment":{"summary":[{"kind":"text","text":"The root container in the DI hierarchy."}]},"sources":[{"fileName":"container.ts","line":186,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L186"}],"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":35,"name":"instance","variant":"declaration","kind":1024,"flags":{"isPublic":true,"isStatic":true},"comment":{"summary":[{"kind":"text","text":"The global root Container instance. Available if makeGlobal() has been\r\ncalled. Aurelia Framework calls makeGlobal()."}]},"sources":[{"fileName":"container.ts","line":176,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L176"}],"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":184,"name":"_createInvocationHandler","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":583,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L583"}],"signatures":[{"id":185,"name":"_createInvocationHandler","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":583,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L583"}],"typeParameters":[{"id":186,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":187,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":186,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":188,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":186,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":189,"name":"fn","variant":"param","kind":32768,"flags":{},"type":{"type":"intersection","types":[{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":186,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":187,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":188,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"},{"type":"reflection","declaration":{"id":190,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":191,"name":"inject","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"container.ts","line":585,"character":59,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L585"}],"type":{"type":"intrinsic","name":"any"}}],"groups":[{"title":"Properties","children":[191]}],"sources":[{"fileName":"container.ts","line":585,"character":57,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L585"}]}}]}}],"type":{"type":"reference","target":9,"typeArguments":[{"type":"reference","target":186,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":187,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":188,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"InvocationHandler","package":"aurelia-dependency-injection"}}]},{"id":166,"name":"_get","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":495,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L495"}],"signatures":[{"id":167,"name":"_get","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":495,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L495"}],"parameters":[{"id":168,"name":"key","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"any"}}]},{"id":118,"name":"autoRegister","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":376,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L376"},{"fileName":"container.ts","line":378,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L378"},{"fileName":"container.ts","line":380,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L380"}],"signatures":[{"id":119,"name":"autoRegister","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Registers a type (constructor function) by inspecting its registration\r\nannotations. If none are found, then the default singleton registration is\r\nused."}]},"sources":[{"fileName":"container.ts","line":376,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L376"}],"typeParameters":[{"id":120,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":121,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":120,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":122,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":120,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":123,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the dependency at resolution time;\r\nusually a constructor function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Primitive"},"name":"Primitive","package":"aurelia-dependency-injection"}},{"id":124,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The constructor function to use when the dependency needs to be\r\ninstantiated. This defaults to the key value when fn is not supplied."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":120,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":121,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":122,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":444,"name":"Resolver","package":"aurelia-dependency-injection"}},{"id":125,"name":"autoRegister","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":378,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L378"}],"typeParameters":[{"id":126,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":127,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":126,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":128,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":126,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":129,"name":"key","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":126,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":127,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":128,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"}},{"id":130,"name":"fn","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":126,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":127,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":128,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":444,"name":"Resolver","package":"aurelia-dependency-injection"}}]},{"id":131,"name":"autoRegisterAll","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":403,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L403"}],"signatures":[{"id":132,"name":"autoRegisterAll","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Registers an array of types (constructor functions) by inspecting their\r\nregistration annotations. If none are found, then the default singleton\r\nregistration is used."}]},"sources":[{"fileName":"container.ts","line":403,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L403"}],"parameters":[{"id":133,"name":"fns","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The constructor function to use when the dependency needs to be instantiated."}]},"type":{"type":"array","elementType":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"}],"name":"DependencyCtor","package":"aurelia-dependency-injection"}}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":175,"name":"createChild","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":547,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L547"}],"signatures":[{"id":176,"name":"createChild","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new dependency injection container whose parent is the current container."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns a new container instance parented to this."}]}]},"sources":[{"fileName":"container.ts","line":547,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L547"}],"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}]},{"id":151,"name":"get","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":457,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L457"},{"fileName":"container.ts","line":459,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L459"},{"fileName":"container.ts","line":461,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L461"},{"fileName":"container.ts","line":463,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L463"}],"signatures":[{"id":152,"name":"get","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Resolves a single instance based on the provided key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns the resolved instance."}]}]},"sources":[{"fileName":"container.ts","line":457,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L457"}],"typeParameters":[{"id":153,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":154,"name":"TResolver","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":611,"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}],"name":"NewInstance","package":"aurelia-dependency-injection"},{"type":"reference","target":501,"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}],"name":"Lazy","package":"aurelia-dependency-injection"},{"type":"reference","target":590,"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}],"name":"Factory","package":"aurelia-dependency-injection"},{"type":"reference","target":545,"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}],"name":"Optional","package":"aurelia-dependency-injection"},{"type":"reference","target":569,"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}],"name":"Parent","package":"aurelia-dependency-injection"},{"type":"reference","target":524,"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":153,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}],"name":"All","package":"aurelia-dependency-injection"}]}}],"parameters":[{"id":155,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the object to resolve."}]},"type":{"type":"reference","target":154,"name":"TResolver","package":"aurelia-dependency-injection","refersToTypeParameter":true}}],"type":{"type":"reference","target":192,"typeArguments":[{"type":"reference","target":154,"name":"TResolver","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"ResolvedValue","package":"aurelia-dependency-injection"}},{"id":156,"name":"get","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":459,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L459"}],"typeParameters":[{"id":157,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":158,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":157,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":159,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":157,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":160,"name":"key","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":157,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":158,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":159,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"ImplOrAny"},"typeArguments":[{"type":"reference","target":158,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"ImplOrAny","package":"aurelia-dependency-injection"}},{"id":161,"name":"get","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":461,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L461"}],"typeParameters":[{"id":162,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":163,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":162,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":164,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":162,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":165,"name":"key","variant":"param","kind":32768,"flags":{},"type":{"type":"query","queryType":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}}],"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}]},{"id":169,"name":"getAll","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":514,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L514"}],"signatures":[{"id":170,"name":"getAll","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Resolves all instance registered under the provided key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns an array of the resolved instances."}]}]},"sources":[{"fileName":"container.ts","line":514,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L514"}],"typeParameters":[{"id":171,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":172,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":171,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":173,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":171,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":174,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the objects to resolve."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":171,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":172,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":173,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"array","elementType":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"ImplOrAny"},"typeArguments":[{"type":"reference","target":172,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"ImplOrAny","package":"aurelia-dependency-injection"}}}]},{"id":144,"name":"getResolver","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":441,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L441"}],"signatures":[{"id":145,"name":"getResolver","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the resolver for the particular key, if it has been registered."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns the resolver, if registred, otherwise undefined."}]}]},"sources":[{"fileName":"container.ts","line":441,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L441"}],"typeParameters":[{"id":146,"name":"TStrategyKey","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","target":466,"typeArguments":[{"type":"reference","target":147,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":148,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":149,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"StrategyState","package":"aurelia-dependency-injection"}}},{"id":147,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":148,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":147,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":149,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":147,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":150,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the dependency at resolution time; usually a constructor function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":147,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":148,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":149,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":482,"typeArguments":[{"type":"reference","target":147,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":148,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":149,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":146,"name":"TStrategyKey","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"StrategyResolver","package":"aurelia-dependency-injection"}}]},{"id":137,"name":"hasResolver","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":424,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L424"}],"signatures":[{"id":138,"name":"hasResolver","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Inspects the container to determine if a particular key has been registred."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns true if the key has been registred; false otherwise."}]}]},"sources":[{"fileName":"container.ts","line":424,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L424"}],"typeParameters":[{"id":139,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":140,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":139,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":141,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":139,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":142,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the dependency at resolution time; usually a constructor function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":139,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":140,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":141,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":143,"name":"checkParent","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Indicates whether or not to check the parent container hierarchy."}]},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"intrinsic","name":"boolean"}}]},{"id":177,"name":"invoke","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":560,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L560"}],"signatures":[{"id":178,"name":"invoke","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Invokes a function, recursively resolving its dependencies."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns the instance resulting from calling the function."}]}]},"sources":[{"fileName":"container.ts","line":560,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L560"}],"typeParameters":[{"id":179,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":180,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":179,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":181,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":179,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":182,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The function to invoke with the auto-resolved dependencies."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":179,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":180,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":181,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":183,"name":"dynamicDependencies","variant":"param","kind":32768,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Additional function dependencies to use during invocation."}]},"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":181,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"ImplOrAny"},"typeArguments":[{"type":"reference","target":180,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"ImplOrAny","package":"aurelia-dependency-injection"}}]},{"id":48,"name":"makeGlobal","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":223,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L223"}],"signatures":[{"id":49,"name":"makeGlobal","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Makes this container instance globally reachable through Container.instance."}]},"sources":[{"fileName":"container.ts","line":223,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L223"}],"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}]},{"id":104,"name":"registerAlias","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":330,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L330"}],"signatures":[{"id":105,"name":"registerAlias","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Registers an additional key that serves as an alias to the original DI key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The resolver that was registered."}]}]},"sources":[{"fileName":"container.ts","line":330,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L330"}],"typeParameters":[{"id":106,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":107,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":106,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":108,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":106,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":109,"name":"originalKey","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that originally identified the dependency; usually a constructor function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":106,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":107,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":108,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":110,"name":"aliasKey","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"An alternate key which can also be used to resolve the same dependency as the original."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":106,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":107,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":108,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":444,"name":"Resolver","package":"aurelia-dependency-injection"}}]},{"id":92,"name":"registerHandler","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":314,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L314"}],"signatures":[{"id":93,"name":"registerHandler","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Registers a custom resolution function such that the container calls this\r\nfunction for each request to obtain the instance."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The resolver that was registered."}]}]},"sources":[{"fileName":"container.ts","line":314,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L314"}],"typeParameters":[{"id":94,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":95,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":94,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":96,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":94,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":97,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the dependency at resolution time;\r\nusually a constructor function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":94,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":95,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":96,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":98,"name":"handler","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The resolution function to use when the dependency is\r\nneeded."}]},"type":{"type":"reflection","declaration":{"id":99,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"container.ts","line":316,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L316"}],"signatures":[{"id":100,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":316,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L316"}],"parameters":[{"id":101,"name":"container","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":102,"name":"key","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":94,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":95,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":96,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":103,"name":"resolver","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":444,"name":"Resolver","package":"aurelia-dependency-injection"}}],"type":{"type":"intrinsic","name":"any"}}]}}}],"type":{"type":"reference","target":444,"name":"Resolver","package":"aurelia-dependency-injection"}}]},{"id":59,"name":"registerInstance","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":254,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L254"}],"signatures":[{"id":60,"name":"registerInstance","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Registers an existing object instance with the container."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The resolver that was registered."}]}]},"sources":[{"fileName":"container.ts","line":254,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L254"}],"typeParameters":[{"id":61,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":62,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":61,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":63,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":61,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":64,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the dependency at resolution time;\r\nusually a constructor function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":61,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":62,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":63,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":65,"name":"instance","variant":"param","kind":32768,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The instance that will be resolved when the key is matched.\r\nThis defaults to the key value when instance is not supplied."}]},"type":{"type":"reference","target":62,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true}}],"type":{"type":"reference","target":444,"name":"Resolver","package":"aurelia-dependency-injection"}}]},{"id":111,"name":"registerResolver","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":347,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L347"}],"signatures":[{"id":112,"name":"registerResolver","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Registers a custom resolution function such that the container calls this\r\nfunction for each request to obtain the instance."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The resolver that was registered."}]}]},"sources":[{"fileName":"container.ts","line":347,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L347"}],"typeParameters":[{"id":113,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":114,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":113,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":115,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":113,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":116,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the dependency at resolution time;\r\nusually a constructor function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":113,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":114,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":115,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":117,"name":"resolver","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The resolver to use when the dependency is needed."}]},"type":{"type":"reference","target":444,"name":"Resolver","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":444,"name":"Resolver","package":"aurelia-dependency-injection"}}]},{"id":66,"name":"registerSingleton","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":272,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L272"},{"fileName":"container.ts","line":274,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L274"},{"fileName":"container.ts","line":276,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L276"}],"signatures":[{"id":67,"name":"registerSingleton","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Registers a type (constructor function) such that the container always\r\nreturns the same instance for each request."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The resolver that was registered."}]}]},"sources":[{"fileName":"container.ts","line":272,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L272"}],"typeParameters":[{"id":68,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":69,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":68,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":70,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":68,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":71,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the dependency at resolution time;\r\nusually a constructor function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Primitive"},"name":"Primitive","package":"aurelia-dependency-injection"}},{"id":72,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The constructor function to use when the dependency needs to be\r\ninstantiated. This defaults to the key value when fn is not supplied."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":68,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":69,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":70,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":444,"name":"Resolver","package":"aurelia-dependency-injection"}},{"id":73,"name":"registerSingleton","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":274,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L274"}],"typeParameters":[{"id":74,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":75,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":74,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":76,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":74,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":77,"name":"key","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":74,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":75,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":76,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"}},{"id":78,"name":"fn","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":74,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":75,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":76,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":444,"name":"Resolver","package":"aurelia-dependency-injection"}}]},{"id":79,"name":"registerTransient","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":293,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L293"},{"fileName":"container.ts","line":295,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L295"},{"fileName":"container.ts","line":297,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L297"}],"signatures":[{"id":80,"name":"registerTransient","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Registers a type (constructor function) such that the container returns a\r\nnew instance for each request."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The resolver that was registered."}]}]},"sources":[{"fileName":"container.ts","line":293,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L293"}],"typeParameters":[{"id":81,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":82,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":81,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":83,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":81,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":84,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the dependency at resolution time;\r\nusually a constructor function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Primitive"},"name":"Primitive","package":"aurelia-dependency-injection"}},{"id":85,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The constructor function to use when the dependency needs to be\r\ninstantiated. This defaults to the key value when fn is not supplied."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":81,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":82,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":83,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":444,"name":"Resolver","package":"aurelia-dependency-injection"}},{"id":86,"name":"registerTransient","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":295,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L295"}],"typeParameters":[{"id":87,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":88,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":87,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":89,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":87,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":90,"name":"key","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":87,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":88,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":89,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"}},{"id":91,"name":"fn","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":87,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":88,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":89,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":444,"name":"Resolver","package":"aurelia-dependency-injection"}}]},{"id":50,"name":"setHandlerCreatedCallback","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":234,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L234"}],"signatures":[{"id":51,"name":"setHandlerCreatedCallback","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets an invocation handler creation callback that will be called when new\r\nInvocationsHandlers are created (called once per Function)."}]},"sources":[{"fileName":"container.ts","line":234,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L234"}],"typeParameters":[{"id":52,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":53,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":52,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":54,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":52,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":55,"name":"onHandlerCreated","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The callback to be called when an\r\nInvocationsHandler is created."}]},"type":{"type":"reflection","declaration":{"id":56,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"container.ts","line":238,"character":24,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L238"}],"signatures":[{"id":57,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":238,"character":24,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L238"}],"parameters":[{"id":58,"name":"handler","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":9,"typeArguments":[{"type":"reference","target":52,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":53,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":54,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"InvocationHandler","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":9,"typeArguments":[{"type":"reference","target":52,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":53,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":54,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"InvocationHandler","package":"aurelia-dependency-injection"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":134,"name":"unregister","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":414,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L414"}],"signatures":[{"id":135,"name":"unregister","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Unregisters based on key."}]},"sources":[{"fileName":"container.ts","line":414,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L414"}],"parameters":[{"id":136,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that identifies the dependency at resolution time; usually a constructor function."}]},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Constructors","children":[36]},{"title":"Properties","children":[39,40,35]},{"title":"Methods","children":[184,166,118,131,175,151,169,144,137,177,48,104,92,59,111,66,79,50,134]}],"sources":[{"fileName":"container.ts","line":171,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L171"}]},{"id":590,"name":"Factory","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to allow injecting dependencies but also passing data to the constructor."}]},"children":[{"id":597,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"resolvers.ts","line":386,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L386"}],"signatures":[{"id":598,"name":"new Factory","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an instance of the Factory class."}]},"sources":[{"fileName":"resolvers.ts","line":386,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L386"}],"typeParameters":[{"id":599,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":600,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":599,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Factory.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":601,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":599,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Factory.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":602,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to resolve from the parent container."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":599,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Factory.TBase","refersToTypeParameter":true},{"type":"reference","target":600,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Factory.TImpl","refersToTypeParameter":true},{"type":"reference","target":601,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Factory.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":590,"typeArguments":[{"type":"reference","target":599,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Factory.TBase","refersToTypeParameter":true},{"type":"reference","target":600,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Factory.TImpl","refersToTypeParameter":true},{"type":"reference","target":601,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Factory.TArgs","refersToTypeParameter":true}],"name":"Factory","package":"aurelia-dependency-injection"}}]},{"id":604,"name":"__resolver_type__","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"A non existent property to help TS distinguish resolvers\r\n\r\nThis is semi-private, and should not be used by application"}]},"sources":[{"fileName":"resolvers.ts","line":380,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L380"}],"type":{"type":"literal","value":"factory"}},{"id":605,"name":"get","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"resolvers.ts","line":397,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L397"}],"signatures":[{"id":606,"name":"get","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to pass the dependencies to the constructor."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns a function that can be invoked to resolve dependencies\r\nlater, and the rest of the parameters."}]}]},"sources":[{"fileName":"resolvers.ts","line":397,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L397"}],"parameters":[{"id":607,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container to invoke the constructor with dependencies\r\nand other parameters."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyFunctor"},"typeArguments":[{"type":"reference","target":599,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Factory.TBase","refersToTypeParameter":true},{"type":"reference","target":600,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Factory.TImpl","refersToTypeParameter":true},{"type":"reference","target":601,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Factory.TArgs","refersToTypeParameter":true}],"name":"DependencyFunctor","package":"aurelia-dependency-injection"}}]},{"id":591,"name":"of","variant":"declaration","kind":2048,"flags":{"isPublic":true,"isStatic":true},"sources":[{"fileName":"resolvers.ts","line":412,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L412"}],"signatures":[{"id":592,"name":"of","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a Factory Resolver for the supplied key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns an instance of Factory for the key."}]}]},"sources":[{"fileName":"resolvers.ts","line":412,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L412"}],"typeParameters":[{"id":593,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":594,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":593,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":595,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":593,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":596,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to resolve."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":593,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":594,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":595,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":590,"typeArguments":[{"type":"reference","target":593,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":594,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":595,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Factory","package":"aurelia-dependency-injection"}}]}],"groups":[{"title":"Constructors","children":[597]},{"title":"Properties","children":[604]},{"title":"Methods","children":[605,591]}],"sources":[{"fileName":"resolvers.ts","line":369,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L369"}],"typeParameters":[{"id":608,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":609,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":599,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Factory.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":599,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Factory.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":610,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":599,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Factory.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":599,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Factory.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}]},{"id":256,"name":"FactoryInvoker","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"An Invoker that is used to invoke a factory method."}]},"children":[{"id":258,"name":"constructor","variant":"declaration","kind":512,"flags":{},"signatures":[{"id":259,"name":"new FactoryInvoker","variant":"signature","kind":16384,"flags":{},"typeParameters":[{"id":260,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":261,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":260,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":262,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":260,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":256,"typeArguments":[{"type":"reference","target":260,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TBase","refersToTypeParameter":true},{"type":"reference","target":261,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TImpl","refersToTypeParameter":true},{"type":"reference","target":262,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TArgs","refersToTypeParameter":true}],"name":"FactoryInvoker","package":"aurelia-dependency-injection"}}]},{"id":257,"name":"instance","variant":"declaration","kind":1024,"flags":{"isPublic":true,"isStatic":true},"comment":{"summary":[{"kind":"text","text":"The singleton instance of the FactoryInvoker."}]},"sources":[{"fileName":"invokers.ts","line":74,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/invokers.ts#L74"}],"type":{"type":"reference","target":256,"typeArguments":[{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"},{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"intrinsic","name":"any"}],"name":"Args","package":"aurelia-dependency-injection"}],"name":"FactoryInvoker","package":"aurelia-dependency-injection"}},{"id":263,"name":"invoke","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"invokers.ts","line":83,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/invokers.ts#L83"}],"signatures":[{"id":264,"name":"invoke","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Invokes the function with the provided dependencies."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The result of the function invocation."}]}]},"sources":[{"fileName":"invokers.ts","line":83,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/invokers.ts#L83"}],"parameters":[{"id":265,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The calling container."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":266,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The constructor or factory function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":260,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TBase","refersToTypeParameter":true},{"type":"reference","target":261,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TImpl","refersToTypeParameter":true},{"type":"reference","target":262,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":267,"name":"dependencies","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The dependencies of the function call."}]},"type":{"type":"reference","target":262,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TArgs","refersToTypeParameter":true}}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"ImplOrAny"},"typeArguments":[{"type":"reference","target":261,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TImpl","refersToTypeParameter":true}],"name":"ImplOrAny","package":"aurelia-dependency-injection"},"implementationOf":{"type":"reference","target":243,"name":"Invoker.invoke"}}],"implementationOf":{"type":"reference","target":242,"name":"Invoker.invoke"}},{"id":268,"name":"invokeWithDynamicDependencies","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"invokers.ts","line":106,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/invokers.ts#L106"}],"signatures":[{"id":269,"name":"invokeWithDynamicDependencies","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Invokes the function with the provided dependencies."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The result of the function invocation."}]}]},"sources":[{"fileName":"invokers.ts","line":106,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/invokers.ts#L106"}],"parameters":[{"id":270,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The calling container."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":271,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The constructor or factory function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":260,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TBase","refersToTypeParameter":true},{"type":"reference","target":261,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TImpl","refersToTypeParameter":true},{"type":"reference","target":262,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":272,"name":"staticDependencies","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The static dependencies of the function."}]},"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":262,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TArgs","refersToTypeParameter":true}}}},{"id":273,"name":"dynamicDependencies","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Additional dependencies to use during invocation."}]},"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":262,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TArgs","refersToTypeParameter":true}}}}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"ImplOrAny"},"typeArguments":[{"type":"reference","target":261,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TImpl","refersToTypeParameter":true}],"name":"ImplOrAny","package":"aurelia-dependency-injection"},"implementationOf":{"type":"reference","target":248,"name":"Invoker.invokeWithDynamicDependencies"}}],"implementationOf":{"type":"reference","target":247,"name":"Invoker.invokeWithDynamicDependencies"}}],"groups":[{"title":"Constructors","children":[258]},{"title":"Properties","children":[257]},{"title":"Methods","children":[263,268]}],"sources":[{"fileName":"invokers.ts","line":66,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/invokers.ts#L66"}],"typeParameters":[{"id":274,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":275,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":260,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":260,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":276,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":260,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":260,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"implementedTypes":[{"type":"reference","target":241,"typeArguments":[{"type":"reference","target":260,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TBase","refersToTypeParameter":true},{"type":"reference","target":261,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TImpl","refersToTypeParameter":true},{"type":"reference","target":262,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"FactoryInvoker.TArgs","refersToTypeParameter":true}],"name":"Invoker","package":"aurelia-dependency-injection"}]},{"id":9,"name":"InvocationHandler","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Stores the information needed to invoke a function."}]},"children":[{"id":10,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"container.ts","line":64,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L64"}],"signatures":[{"id":11,"name":"new InvocationHandler","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Instantiates an InvocationDescription."}]},"sources":[{"fileName":"container.ts","line":64,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L64"}],"typeParameters":[{"id":12,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":13,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"}},{"id":14,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]}}],"parameters":[{"id":15,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The Function described by this description object."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":12,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TBase","refersToTypeParameter":true},{"type":"reference","target":13,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TImpl","refersToTypeParameter":true},{"type":"reference","target":14,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":16,"name":"invoker","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The strategy for invoking the function."}]},"type":{"type":"reference","target":241,"typeArguments":[{"type":"reference","target":12,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TBase","refersToTypeParameter":true},{"type":"reference","target":13,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TImpl","refersToTypeParameter":true},{"type":"reference","target":14,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TArgs","refersToTypeParameter":true}],"name":"Invoker","package":"aurelia-dependency-injection"}},{"id":17,"name":"dependencies","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The static dependencies of the function call."}]},"type":{"type":"reference","target":14,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TArgs","refersToTypeParameter":true}}],"type":{"type":"reference","target":9,"typeArguments":[{"type":"reference","target":12,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TBase","refersToTypeParameter":true},{"type":"reference","target":13,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TImpl","refersToTypeParameter":true},{"type":"reference","target":14,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TArgs","refersToTypeParameter":true}],"name":"InvocationHandler","package":"aurelia-dependency-injection"}}]},{"id":20,"name":"dependencies","variant":"declaration","kind":1024,"flags":{"isPublic":true},"comment":{"summary":[{"kind":"text","text":"The statically known dependencies of this function invocation."}]},"sources":[{"fileName":"container.ts","line":56,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L56"}],"type":{"type":"reference","target":14,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TArgs","refersToTypeParameter":true}},{"id":18,"name":"fn","variant":"declaration","kind":1024,"flags":{"isPublic":true},"comment":{"summary":[{"kind":"text","text":"The function to be invoked by this handler."}]},"sources":[{"fileName":"container.ts","line":46,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L46"}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":12,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TBase","refersToTypeParameter":true},{"type":"reference","target":13,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TImpl","refersToTypeParameter":true},{"type":"reference","target":14,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":19,"name":"invoker","variant":"declaration","kind":1024,"flags":{"isPublic":true},"comment":{"summary":[{"kind":"text","text":"The invoker implementation that will be used to actually invoke the function."}]},"sources":[{"fileName":"container.ts","line":51,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L51"}],"type":{"type":"reference","target":241,"typeArguments":[{"type":"reference","target":12,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TBase","refersToTypeParameter":true},{"type":"reference","target":13,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TImpl","refersToTypeParameter":true},{"type":"reference","target":14,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TArgs","refersToTypeParameter":true}],"name":"Invoker","package":"aurelia-dependency-injection"}},{"id":21,"name":"invoke","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"container.ts","line":80,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L80"}],"signatures":[{"id":22,"name":"invoke","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Invokes the function."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The result of the function invocation."}]}]},"sources":[{"fileName":"container.ts","line":80,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L80"}],"parameters":[{"id":23,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The calling container."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":24,"name":"dynamicDependencies","variant":"param","kind":32768,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Additional dependencies to use during invocation."}]},"type":{"type":"array","elementType":{"type":"reference","target":14,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TArgs","refersToTypeParameter":true}}}],"type":{"type":"reference","target":13,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TImpl","refersToTypeParameter":true}}]}],"groups":[{"title":"Constructors","children":[10]},{"title":"Properties","children":[20,18,19]},{"title":"Methods","children":[21]}],"sources":[{"fileName":"container.ts","line":38,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L38"}],"typeParameters":[{"id":25,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":26,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":12,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":27,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":12,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"InvocationHandler.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}]},{"id":501,"name":"Lazy","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to allow functions/classes to specify lazy resolution logic."}]},"children":[{"id":508,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"resolvers.ts","line":176,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L176"}],"signatures":[{"id":509,"name":"new Lazy","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an instance of the Lazy class."}]},"sources":[{"fileName":"resolvers.ts","line":176,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L176"}],"typeParameters":[{"id":510,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":511,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":510,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":512,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":510,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":513,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to lazily resolve."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":510,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TBase","refersToTypeParameter":true},{"type":"reference","target":511,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TImpl","refersToTypeParameter":true},{"type":"reference","target":512,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":501,"typeArguments":[{"type":"reference","target":510,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TBase","refersToTypeParameter":true},{"type":"reference","target":511,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TImpl","refersToTypeParameter":true},{"type":"reference","target":512,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TArgs","refersToTypeParameter":true}],"name":"Lazy","package":"aurelia-dependency-injection"}}]},{"id":515,"name":"__resolver_type__","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"A non existent property to help TS distinguish resolvers\r\n\r\nThis is semi-private, and should not be used by application"}]},"sources":[{"fileName":"resolvers.ts","line":170,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L170"}],"type":{"type":"literal","value":"lazy"}},{"id":516,"name":"get","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"resolvers.ts","line":187,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L187"}],"signatures":[{"id":517,"name":"get","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to lazily resolve the dependency into a lazy locator\r\nfunction."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns a function which can be invoked at a later time to obtain\r\nthe actual dependency."}]}]},"sources":[{"fileName":"resolvers.ts","line":187,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L187"}],"parameters":[{"id":518,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container to resolve from."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}],"type":{"type":"reflection","declaration":{"id":519,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"resolvers.ts","line":187,"character":36,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L187"}],"signatures":[{"id":520,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"resolvers.ts","line":187,"character":36,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L187"}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"ImplOrAny"},"typeArguments":[{"type":"reference","target":511,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TImpl","refersToTypeParameter":true}],"name":"ImplOrAny","package":"aurelia-dependency-injection"}}]}}}]},{"id":502,"name":"of","variant":"declaration","kind":2048,"flags":{"isPublic":true,"isStatic":true},"sources":[{"fileName":"resolvers.ts","line":196,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L196"}],"signatures":[{"id":503,"name":"of","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a Lazy Resolver for the supplied key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns an instance of Lazy for the key."}]}]},"sources":[{"fileName":"resolvers.ts","line":196,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L196"}],"typeParameters":[{"id":504,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":505,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":504,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":506,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":504,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":507,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to lazily resolve."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":504,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":505,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":506,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":501,"typeArguments":[{"type":"reference","target":504,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":505,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":506,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Lazy","package":"aurelia-dependency-injection"}}]}],"groups":[{"title":"Constructors","children":[508]},{"title":"Properties","children":[515]},{"title":"Methods","children":[516,502]}],"sources":[{"fileName":"resolvers.ts","line":159,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L159"}],"typeParameters":[{"id":521,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":522,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":510,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":510,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":523,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":510,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":510,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Lazy.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}]},{"id":611,"name":"NewInstance","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to inject a new instance of a dependency, without regard for existing\r\ninstances in the container. Instances can optionally be registered in the\r\ncontainer\r\nunder a different key by supplying a key using the "},{"kind":"code","text":"`as`"},{"kind":"text","text":" method."}]},"children":[{"id":619,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"resolvers.ts","line":451,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L451"}],"signatures":[{"id":620,"name":"new NewInstance","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an instance of the NewInstance class."}]},"sources":[{"fileName":"resolvers.ts","line":451,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L451"}],"typeParameters":[{"id":621,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":622,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":621,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":623,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":621,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":624,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to resolve/instantiate."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":621,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TBase","refersToTypeParameter":true},{"type":"reference","target":622,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TImpl","refersToTypeParameter":true},{"type":"reference","target":623,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":625,"name":"dynamicDependencies","variant":"param","kind":32768,"flags":{"isRest":true},"comment":{"summary":[{"kind":"text","text":"An optional list of dynamic dependencies."}]},"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":623,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TArgs","refersToTypeParameter":true}}}}],"type":{"type":"reference","target":611,"typeArguments":[{"type":"reference","target":621,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TBase","refersToTypeParameter":true},{"type":"reference","target":622,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TImpl","refersToTypeParameter":true},{"type":"reference","target":623,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TArgs","refersToTypeParameter":true}],"name":"NewInstance","package":"aurelia-dependency-injection"}}]},{"id":629,"name":"__resolver_type__","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"A non existent property to help TS distinguish resolvers\r\n\r\nThis is semi-private, and should not be used by application"}]},"sources":[{"fileName":"resolvers.ts","line":444,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L444"}],"type":{"type":"literal","value":"newInstance"}},{"id":633,"name":"as","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"resolvers.ts","line":491,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L491"}],"signatures":[{"id":634,"name":"as","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Instructs the NewInstance resolver to register the resolved instance using\r\nthe supplied key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns the NewInstance resolver."}]}]},"sources":[{"fileName":"resolvers.ts","line":491,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L491"}],"parameters":[{"id":635,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to register the instance with."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":621,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TBase","refersToTypeParameter":true},{"type":"reference","target":622,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TImpl","refersToTypeParameter":true},{"type":"reference","target":623,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":611,"typeArguments":[{"type":"reference","target":621,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TBase","refersToTypeParameter":true},{"type":"reference","target":622,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TImpl","refersToTypeParameter":true},{"type":"reference","target":623,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TArgs","refersToTypeParameter":true}],"name":"NewInstance","package":"aurelia-dependency-injection"}}]},{"id":630,"name":"get","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"resolvers.ts","line":464,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L464"}],"signatures":[{"id":631,"name":"get","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to instantiate the dependency and potentially\r\nregister\r\nas another key if the "},{"kind":"code","text":"`as`"},{"kind":"text","text":" method was used."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns the matching instance from the parent container"}]}]},"sources":[{"fileName":"resolvers.ts","line":464,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L464"}],"parameters":[{"id":632,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container to resolve the parent from."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"ImplOrAny"},"typeArguments":[{"type":"reference","target":622,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TImpl","refersToTypeParameter":true}],"name":"ImplOrAny","package":"aurelia-dependency-injection"}}]},{"id":612,"name":"of","variant":"declaration","kind":2048,"flags":{"isPublic":true,"isStatic":true},"sources":[{"fileName":"resolvers.ts","line":502,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L502"}],"signatures":[{"id":613,"name":"of","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an NewInstance Resolver for the supplied key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns an instance of NewInstance for the key."}]}]},"sources":[{"fileName":"resolvers.ts","line":502,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L502"}],"typeParameters":[{"id":614,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":615,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":614,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":616,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":614,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":617,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to resolve/instantiate."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":614,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":615,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":616,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":618,"name":"dynamicDependencies","variant":"param","kind":32768,"flags":{"isRest":true},"comment":{"summary":[{"kind":"text","text":"An optional list of dynamic dependencies."}]},"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":616,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}}],"type":{"type":"reference","target":611,"typeArguments":[{"type":"reference","target":614,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":615,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":616,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"NewInstance","package":"aurelia-dependency-injection"}}]}],"groups":[{"title":"Constructors","children":[619]},{"title":"Properties","children":[629]},{"title":"Methods","children":[633,630,612]}],"sources":[{"fileName":"resolvers.ts","line":428,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L428"}],"typeParameters":[{"id":636,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":637,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":621,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":621,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":638,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":621,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":621,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"NewInstance.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}]},{"id":545,"name":"Optional","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to allow functions/classes to specify an optional dependency, which will\r\nbe resolved only if already registred with the container."}]},"children":[{"id":553,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"resolvers.ts","line":282,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L282"}],"signatures":[{"id":554,"name":"new Optional","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an instance of the Optional class."}]},"sources":[{"fileName":"resolvers.ts","line":282,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L282"}],"typeParameters":[{"id":555,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":556,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":555,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Optional.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":557,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":555,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Optional.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":558,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to optionally resolve for."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":555,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Optional.TBase","refersToTypeParameter":true},{"type":"reference","target":556,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Optional.TImpl","refersToTypeParameter":true},{"type":"reference","target":557,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Optional.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":559,"name":"checkParent","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Indicates whether or not the parent container hierarchy\r\nshould be checked."}]},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"true"}],"type":{"type":"reference","target":545,"typeArguments":[{"type":"reference","target":555,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Optional.TBase","refersToTypeParameter":true},{"type":"reference","target":556,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Optional.TImpl","refersToTypeParameter":true},{"type":"reference","target":557,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Optional.TArgs","refersToTypeParameter":true}],"name":"Optional","package":"aurelia-dependency-injection"}}]},{"id":562,"name":"__resolver_type__","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"A non existent property to help TS distinguish resolvers\r\n\r\nThis is semi-private, and should not be used by application"}]},"sources":[{"fileName":"resolvers.ts","line":274,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L274"}],"type":{"type":"literal","value":"optional"}},{"id":563,"name":"get","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"resolvers.ts","line":292,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L292"}],"signatures":[{"id":564,"name":"get","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to provide optional resolution of the key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns the instance if found; otherwise null."}]}]},"sources":[{"fileName":"resolvers.ts","line":292,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L292"}],"parameters":[{"id":565,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container to resolve from."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":556,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Optional.TImpl","refersToTypeParameter":true}]}}]},{"id":546,"name":"of","variant":"declaration","kind":2048,"flags":{"isPublic":true,"isStatic":true},"sources":[{"fileName":"resolvers.ts","line":307,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L307"}],"signatures":[{"id":547,"name":"of","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an Optional Resolver for the supplied key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns an instance of Optional for the key."}]}]},"sources":[{"fileName":"resolvers.ts","line":307,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L307"}],"typeParameters":[{"id":548,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":549,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":548,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":550,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":548,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":551,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to optionally resolve for."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":548,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":549,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":550,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":552,"name":"checkParent","variant":"param","kind":32768,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Indicates whether or not the parent container\r\nhierarchy should be checked."}]},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"true"}],"type":{"type":"reference","target":545,"typeArguments":[{"type":"reference","target":548,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":549,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":550,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Optional","package":"aurelia-dependency-injection"}}]}],"groups":[{"title":"Constructors","children":[553]},{"title":"Properties","children":[562]},{"title":"Methods","children":[563,546]}],"sources":[{"fileName":"resolvers.ts","line":260,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L260"}],"typeParameters":[{"id":566,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":567,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":555,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Optional.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":555,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Optional.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":568,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":555,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Optional.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":555,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Optional.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}]},{"id":569,"name":"Parent","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to inject the dependency from the parent container instead of the current\r\none."}]},"children":[{"id":576,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"resolvers.ts","line":338,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L338"}],"signatures":[{"id":577,"name":"new Parent","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an instance of the Parent class."}]},"sources":[{"fileName":"resolvers.ts","line":338,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L338"}],"typeParameters":[{"id":578,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":579,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":578,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Parent.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":580,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":578,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Parent.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":581,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to resolve from the parent container."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":578,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Parent.TBase","refersToTypeParameter":true},{"type":"reference","target":579,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Parent.TImpl","refersToTypeParameter":true},{"type":"reference","target":580,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Parent.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":569,"typeArguments":[{"type":"reference","target":578,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Parent.TBase","refersToTypeParameter":true},{"type":"reference","target":579,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Parent.TImpl","refersToTypeParameter":true},{"type":"reference","target":580,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Parent.TArgs","refersToTypeParameter":true}],"name":"Parent","package":"aurelia-dependency-injection"}}]},{"id":583,"name":"__resolver_type__","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"A non existent property to help TS distinguish resolvers\r\n\r\nThis is semi-private, and should not be used by application"}]},"sources":[{"fileName":"resolvers.ts","line":332,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L332"}],"type":{"type":"literal","value":"parent"}},{"id":584,"name":"get","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"resolvers.ts","line":347,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L347"}],"signatures":[{"id":585,"name":"get","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to load the dependency from the parent container"}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns the matching instance from the parent container"}]}]},"sources":[{"fileName":"resolvers.ts","line":347,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L347"}],"parameters":[{"id":586,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container to resolve the parent from."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":579,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Parent.TImpl","refersToTypeParameter":true}]}}]},{"id":570,"name":"of","variant":"declaration","kind":2048,"flags":{"isPublic":true,"isStatic":true},"sources":[{"fileName":"resolvers.ts","line":356,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L356"}],"signatures":[{"id":571,"name":"of","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a Parent Resolver for the supplied key."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns an instance of Parent for the key."}]}]},"sources":[{"fileName":"resolvers.ts","line":356,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L356"}],"typeParameters":[{"id":572,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":573,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":572,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":574,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":572,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":575,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key to resolve."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":572,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":573,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":574,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":569,"typeArguments":[{"type":"reference","target":572,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":573,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":574,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Parent","package":"aurelia-dependency-injection"}}]}],"groups":[{"title":"Constructors","children":[576]},{"title":"Properties","children":[583]},{"title":"Methods","children":[584,570]}],"sources":[{"fileName":"resolvers.ts","line":321,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L321"}],"typeParameters":[{"id":587,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":588,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":578,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Parent.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":578,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Parent.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":589,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":578,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Parent.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":578,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Parent.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}]},{"id":329,"name":"SingletonRegistration","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to allow functions/classes to indicate that they should be registered as\r\nsingletons with the container."}]},"children":[{"id":330,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"registrations.ts","line":122,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L122"}],"signatures":[{"id":331,"name":"new SingletonRegistration","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an instance of SingletonRegistration."}]},"sources":[{"fileName":"registrations.ts","line":122,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L122"}],"typeParameters":[{"id":332,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":333,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"}},{"id":334,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]}}],"parameters":[{"id":335,"name":"keyOrRegisterInChild","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":332,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TBase","refersToTypeParameter":true},{"type":"reference","target":333,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TImpl","refersToTypeParameter":true},{"type":"reference","target":334,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":336,"name":"registerInChild","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"reference","target":329,"typeArguments":[{"type":"reference","target":332,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TBase","refersToTypeParameter":true},{"type":"reference","target":333,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TImpl","refersToTypeParameter":true},{"type":"reference","target":334,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TArgs","refersToTypeParameter":true}],"name":"SingletonRegistration","package":"aurelia-dependency-injection"}}]},{"id":339,"name":"registerResolver","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"registrations.ts","line":140,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L140"}],"signatures":[{"id":340,"name":"registerResolver","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to register the resolver."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The resolver that was registered."}]}]},"sources":[{"fileName":"registrations.ts","line":140,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L140"}],"parameters":[{"id":341,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container the resolver is being registered with."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":342,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key the resolver should be registered as."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":332,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TBase","refersToTypeParameter":true},{"type":"reference","target":333,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TImpl","refersToTypeParameter":true},{"type":"reference","target":334,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":343,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The function to create the resolver for."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":332,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TBase","refersToTypeParameter":true},{"type":"reference","target":333,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TImpl","refersToTypeParameter":true},{"type":"reference","target":334,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":444,"name":"Resolver","package":"aurelia-dependency-injection"},"implementationOf":{"type":"reference","target":306,"name":"Registration.registerResolver"}}],"implementationOf":{"type":"reference","target":305,"name":"Registration.registerResolver"}}],"groups":[{"title":"Constructors","children":[330]},{"title":"Methods","children":[339]}],"sources":[{"fileName":"registrations.ts","line":110,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L110"}],"typeParameters":[{"id":344,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":345,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":332,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":346,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":332,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"implementedTypes":[{"type":"reference","target":304,"typeArguments":[{"type":"reference","target":332,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TBase","refersToTypeParameter":true},{"type":"reference","target":333,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TImpl","refersToTypeParameter":true},{"type":"reference","target":334,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"SingletonRegistration.TArgs","refersToTypeParameter":true}],"name":"Registration","package":"aurelia-dependency-injection"}]},{"id":482,"name":"StrategyResolver","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to resolve instances, singletons, transients, aliases"}]},"children":[{"id":483,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"resolvers.ts","line":117,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L117"}],"signatures":[{"id":484,"name":"new StrategyResolver","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an instance of the StrategyResolver class."}]},"sources":[{"fileName":"resolvers.ts","line":117,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L117"}],"typeParameters":[{"id":485,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":486,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"}},{"id":487,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]}},{"id":488,"name":"TStrategyKey","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","target":466,"typeArguments":[{"type":"reference","target":485,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TBase","refersToTypeParameter":true},{"type":"reference","target":486,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TImpl","refersToTypeParameter":true},{"type":"reference","target":487,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TArgs","refersToTypeParameter":true}],"name":"StrategyState","package":"aurelia-dependency-injection"}}}],"parameters":[{"id":489,"name":"strategy","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The type of resolution strategy."}]},"type":{"type":"reference","target":488,"name":"TStrategyKey","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TStrategyKey","refersToTypeParameter":true}},{"id":490,"name":"state","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The state associated with the resolution strategy."}]},"type":{"type":"indexedAccess","indexType":{"type":"reference","target":488,"name":"TStrategyKey","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TStrategyKey","refersToTypeParameter":true},"objectType":{"type":"reference","target":466,"typeArguments":[{"type":"reference","target":485,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TBase","refersToTypeParameter":true},{"type":"reference","target":486,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TImpl","refersToTypeParameter":true},{"type":"reference","target":487,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TArgs","refersToTypeParameter":true}],"name":"StrategyState","package":"aurelia-dependency-injection"}}}],"type":{"type":"reference","target":482,"typeArguments":[{"type":"reference","target":485,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TBase","refersToTypeParameter":true},{"type":"reference","target":486,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TImpl","refersToTypeParameter":true},{"type":"reference","target":487,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TArgs","refersToTypeParameter":true},{"type":"reference","target":488,"name":"TStrategyKey","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TStrategyKey","refersToTypeParameter":true}],"name":"StrategyResolver","package":"aurelia-dependency-injection"}}]},{"id":492,"name":"state","variant":"declaration","kind":1024,"flags":{"isPublic":true},"sources":[{"fileName":"resolvers.ts","line":110,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L110"}],"type":{"type":"intrinsic","name":"any"}},{"id":491,"name":"strategy","variant":"declaration","kind":1024,"flags":{"isPublic":true},"sources":[{"fileName":"resolvers.ts","line":109,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L109"}],"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","target":466,"typeArguments":[{"type":"reference","target":485,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TBase","refersToTypeParameter":true},{"type":"reference","target":486,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TImpl","refersToTypeParameter":true},{"type":"reference","target":487,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TArgs","refersToTypeParameter":true}],"name":"StrategyState","package":"aurelia-dependency-injection"}}},{"id":493,"name":"get","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"resolvers.ts","line":129,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L129"}],"signatures":[{"id":494,"name":"get","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to allow custom resolution of dependencies for a\r\nfunction/class."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns the resolved object."}]}]},"sources":[{"fileName":"resolvers.ts","line":129,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L129"}],"parameters":[{"id":495,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container to resolve from."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":496,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that the resolver was registered as."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":485,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TBase","refersToTypeParameter":true},{"type":"reference","target":486,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TImpl","refersToTypeParameter":true},{"type":"reference","target":487,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":486,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TImpl","refersToTypeParameter":true}}]}],"groups":[{"title":"Constructors","children":[483]},{"title":"Properties","children":[492,491]},{"title":"Methods","children":[493]}],"sources":[{"fileName":"resolvers.ts","line":103,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L103"}],"typeParameters":[{"id":497,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":498,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":485,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":499,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":485,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}},{"id":500,"name":"TStrategyKey","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","target":466,"typeArguments":[{"type":"reference","target":485,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TBase","refersToTypeParameter":true},{"type":"reference","target":486,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TImpl","refersToTypeParameter":true},{"type":"reference","target":487,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"StrategyResolver.TArgs","refersToTypeParameter":true}],"name":"StrategyState","package":"aurelia-dependency-injection"}}}]},{"id":313,"name":"TransientRegistration","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to allow functions/classes to indicate that they should be registered as\r\ntransients with the container."}]},"children":[{"id":314,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"registrations.ts","line":81,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L81"}],"signatures":[{"id":315,"name":"new TransientRegistration","variant":"signature","kind":16384,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates an instance of TransientRegistration."}]},"sources":[{"fileName":"registrations.ts","line":81,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L81"}],"typeParameters":[{"id":316,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":317,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"}},{"id":318,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]}}],"parameters":[{"id":319,"name":"key","variant":"param","kind":32768,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The key to register as."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":316,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TBase","refersToTypeParameter":true},{"type":"reference","target":317,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TImpl","refersToTypeParameter":true},{"type":"reference","target":318,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":313,"typeArguments":[{"type":"reference","target":316,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TBase","refersToTypeParameter":true},{"type":"reference","target":317,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TImpl","refersToTypeParameter":true},{"type":"reference","target":318,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TArgs","refersToTypeParameter":true}],"name":"TransientRegistration","package":"aurelia-dependency-injection"}}]},{"id":321,"name":"registerResolver","variant":"declaration","kind":2048,"flags":{"isPublic":true},"sources":[{"fileName":"registrations.ts","line":92,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L92"}],"signatures":[{"id":322,"name":"registerResolver","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to register the resolver."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The resolver that was registered."}]}]},"sources":[{"fileName":"registrations.ts","line":92,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L92"}],"parameters":[{"id":323,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container the resolver is being registered with."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":324,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key the resolver should be registered as."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":316,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TBase","refersToTypeParameter":true},{"type":"reference","target":317,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TImpl","refersToTypeParameter":true},{"type":"reference","target":318,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":325,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The function to create the resolver for."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":316,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TBase","refersToTypeParameter":true},{"type":"reference","target":317,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TImpl","refersToTypeParameter":true},{"type":"reference","target":318,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":444,"name":"Resolver","package":"aurelia-dependency-injection"},"implementationOf":{"type":"reference","target":306,"name":"Registration.registerResolver"}}],"implementationOf":{"type":"reference","target":305,"name":"Registration.registerResolver"}}],"groups":[{"title":"Constructors","children":[314]},{"title":"Methods","children":[321]}],"sources":[{"fileName":"registrations.ts","line":72,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L72"}],"typeParameters":[{"id":326,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":327,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":316,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":328,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":316,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"implementedTypes":[{"type":"reference","target":304,"typeArguments":[{"type":"reference","target":316,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TBase","refersToTypeParameter":true},{"type":"reference","target":317,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TImpl","refersToTypeParameter":true},{"type":"reference","target":318,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"TransientRegistration.TArgs","refersToTypeParameter":true}],"name":"Registration","package":"aurelia-dependency-injection"}]},{"id":28,"name":"ContainerConfiguration","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to configure a Container instance."}]},"children":[{"id":33,"name":"handlers","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"container.ts","line":110,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L110"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es2015.collection.d.ts","qualifiedName":"Map"},"typeArguments":[{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"}],"name":"Map","package":"typescript"}},{"id":29,"name":"onHandlerCreated","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"An optional callback which will be called when any function needs an\r\nInvocationHandler created (called once per Function)."}]},"sources":[{"fileName":"container.ts","line":106,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L106"}],"type":{"type":"reflection","declaration":{"id":30,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"container.ts","line":106,"character":21,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L106"}],"signatures":[{"id":31,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":106,"character":21,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L106"}],"parameters":[{"id":32,"name":"handler","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":9,"typeArguments":[{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"}],"name":"InvocationHandler","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":9,"typeArguments":[{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"}],"name":"InvocationHandler","package":"aurelia-dependency-injection"}}]}}}],"groups":[{"title":"Properties","children":[33,29]}],"sources":[{"fileName":"container.ts","line":101,"character":17,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L101"}]},{"id":241,"name":"Invoker","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[{"kind":"text","text":"A strategy for invoking a function, resulting in an object instance."}]},"children":[{"id":242,"name":"invoke","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"invokers.ts","line":41,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/invokers.ts#L41"}],"signatures":[{"id":243,"name":"invoke","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Invokes the function with the provided dependencies."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The result of the function invocation."}]}]},"sources":[{"fileName":"invokers.ts","line":41,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/invokers.ts#L41"}],"parameters":[{"id":244,"name":"container","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":245,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The constructor or factory function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":253,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TBase","refersToTypeParameter":true},{"type":"reference","target":254,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TImpl","refersToTypeParameter":true},{"type":"reference","target":255,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":246,"name":"dependencies","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The dependencies of the function call."}]},"type":{"type":"reference","target":255,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TArgs","refersToTypeParameter":true}}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"ImplOrAny"},"typeArguments":[{"type":"reference","target":254,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TImpl","refersToTypeParameter":true}],"name":"ImplOrAny","package":"aurelia-dependency-injection"}}]},{"id":247,"name":"invokeWithDynamicDependencies","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"invokers.ts","line":55,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/invokers.ts#L55"}],"signatures":[{"id":248,"name":"invokeWithDynamicDependencies","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Invokes the function with the provided dependencies."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The result of the function invocation."}]}]},"sources":[{"fileName":"invokers.ts","line":55,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/invokers.ts#L55"}],"parameters":[{"id":249,"name":"container","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":250,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The constructor or factory function."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":253,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TBase","refersToTypeParameter":true},{"type":"reference","target":254,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TImpl","refersToTypeParameter":true},{"type":"reference","target":255,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":251,"name":"staticDependencies","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The static dependencies of the function."}]},"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":255,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TArgs","refersToTypeParameter":true}}}},{"id":252,"name":"dynamicDependencies","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Additional dependencies to use during\r\ninvocation."}]},"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":255,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TArgs","refersToTypeParameter":true}}}}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"ImplOrAny"},"typeArguments":[{"type":"reference","target":254,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TImpl","refersToTypeParameter":true}],"name":"ImplOrAny","package":"aurelia-dependency-injection"}}]}],"groups":[{"title":"Methods","children":[242,247]}],"sources":[{"fileName":"invokers.ts","line":34,"character":17,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/invokers.ts#L34"}],"typeParameters":[{"id":253,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":254,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":253,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":255,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":253,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Invoker.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"implementedBy":[{"type":"reference","target":256,"name":"FactoryInvoker"}]},{"id":304,"name":"Registration","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[{"kind":"text","text":"Customizes how a particular function is resolved by the Container."}]},"children":[{"id":305,"name":"registerResolver","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"registrations.ts","line":61,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L61"}],"signatures":[{"id":306,"name":"registerResolver","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to register the resolver."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The resolver that was registered."}]}]},"sources":[{"fileName":"registrations.ts","line":61,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L61"}],"parameters":[{"id":307,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container the resolver is being registered with."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":308,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key the resolver should be registered as."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":310,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Registration.TBase","refersToTypeParameter":true},{"type":"reference","target":311,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Registration.TImpl","refersToTypeParameter":true},{"type":"reference","target":312,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Registration.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":309,"name":"fn","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The function to create the resolver for."}]},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":310,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Registration.TBase","refersToTypeParameter":true},{"type":"reference","target":311,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"Registration.TImpl","refersToTypeParameter":true},{"type":"reference","target":312,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"Registration.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":444,"name":"Resolver","package":"aurelia-dependency-injection"}}]}],"groups":[{"title":"Methods","children":[305]}],"sources":[{"fileName":"registrations.ts","line":50,"character":17,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L50"}],"typeParameters":[{"id":310,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":311,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":310,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Registration.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":312,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":310,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"Registration.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"implementedBy":[{"type":"reference","target":329,"name":"SingletonRegistration"},{"type":"reference","target":313,"name":"TransientRegistration"}]},{"id":444,"name":"Resolver","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used to allow functions/classes to specify custom dependency resolution logic."}]},"children":[{"id":445,"name":"get","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"resolvers.ts","line":42,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L42"}],"signatures":[{"id":446,"name":"get","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Called by the container to allow custom resolution of dependencies for a\r\nfunction/class."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns the resolved object."}]}]},"sources":[{"fileName":"resolvers.ts","line":42,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L42"}],"parameters":[{"id":447,"name":"container","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The container to resolve from."}]},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":448,"name":"key","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The key that the resolver was registered as."}]},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"any"}}]}],"groups":[{"title":"Methods","children":[445]}],"sources":[{"fileName":"resolvers.ts","line":34,"character":17,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L34"}]},{"id":466,"name":"StrategyState","variant":"declaration","kind":256,"flags":{},"children":[{"id":467,"name":"0","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"resolvers.ts","line":70,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L70"}],"type":{"type":"reference","target":480,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TImpl","refersToTypeParameter":true}},{"id":468,"name":"1","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"resolvers.ts","line":71,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L71"}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":479,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TBase","refersToTypeParameter":true},{"type":"reference","target":480,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TImpl","refersToTypeParameter":true},{"type":"reference","target":481,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":469,"name":"2","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"resolvers.ts","line":72,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L72"}],"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":479,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TBase","refersToTypeParameter":true},{"type":"reference","target":480,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TImpl","refersToTypeParameter":true},{"type":"reference","target":481,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TArgs","refersToTypeParameter":true}],"name":"DependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":470,"name":"3","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"resolvers.ts","line":73,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L73"}],"type":{"type":"reference","target":457,"typeArguments":[{"type":"reference","target":479,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TBase","refersToTypeParameter":true},{"type":"reference","target":480,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TImpl","refersToTypeParameter":true},{"type":"reference","target":481,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TArgs","refersToTypeParameter":true}],"name":"StrategyFunctor","package":"aurelia-dependency-injection"}},{"id":471,"name":"4","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"For typings purposes, this is done as ({ get: StrategyFunctor } | TImpl)[]\r\nBut it should be understood, and used as [{ get: StrategyFunctor }, ...TImp[]]"}]},"sources":[{"fileName":"resolvers.ts","line":78,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L78"}],"type":{"type":"array","elementType":{"type":"union","types":[{"type":"reference","target":480,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TImpl","refersToTypeParameter":true},{"type":"reflection","declaration":{"id":472,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":473,"name":"get","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"resolvers.ts","line":79,"character":4,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L79"}],"type":{"type":"reflection","declaration":{"id":474,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"resolvers.ts","line":79,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L79"}],"signatures":[{"id":475,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"resolvers.ts","line":79,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L79"}],"parameters":[{"id":476,"name":"container","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":477,"name":"key","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":479,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TBase","refersToTypeParameter":true},{"type":"reference","target":480,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TImpl","refersToTypeParameter":true},{"type":"reference","target":481,"name":"TArgs","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TArgs","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reference","target":480,"name":"TImpl","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TImpl","refersToTypeParameter":true}}]}}}],"groups":[{"title":"Properties","children":[473]}],"sources":[{"fileName":"resolvers.ts","line":78,"character":21,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L78"}]}}]}}},{"id":478,"name":"5","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"resolvers.ts","line":84,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L84"}],"type":{"type":"intrinsic","name":"any"}}],"groups":[{"title":"Properties","children":[467,468,469,470,471,478]}],"sources":[{"fileName":"resolvers.ts","line":65,"character":17,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L65"}],"typeParameters":[{"id":479,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":480,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":479,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":479,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TBase","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":481,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":479,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":479,"name":"TBase","package":"aurelia-dependency-injection","qualifiedName":"StrategyState.TBase","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}]},{"id":456,"name":"IStrategy","variant":"declaration","kind":2097152,"flags":{},"sources":[{"fileName":"resolvers.ts","line":53,"character":12,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L53"}],"type":{"type":"union","types":[{"type":"literal","value":1},{"type":"literal","value":2},{"type":"literal","value":3},{"type":"literal","value":4},{"type":"literal","value":5}]}},{"id":218,"name":"Injectable","variant":"declaration","kind":2097152,"flags":{},"sources":[{"fileName":"injection.ts","line":6,"character":12,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/injection.ts#L6"}],"type":{"type":"intersection","types":[{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Function"},"name":"Function","package":"typescript"},{"type":"reflection","declaration":{"id":219,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":220,"name":"inject","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"injection.ts","line":6,"character":38,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/injection.ts#L6"}],"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"reflection","declaration":{"id":221,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"injection.ts","line":6,"character":56,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/injection.ts#L6"}],"signatures":[{"id":222,"name":"__type","variant":"signature","kind":4096,"flags":{},"type":{"type":"array","elementType":{"type":"intrinsic","name":"any"}}}]}}]}}],"groups":[{"title":"Properties","children":[220]}],"sources":[{"fileName":"injection.ts","line":6,"character":36,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/injection.ts#L6"}]}}]}},{"id":192,"name":"ResolvedValue","variant":"declaration","kind":2097152,"flags":{},"sources":[{"fileName":"container.ts","line":610,"character":12,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L610"}],"typeParameters":[{"id":204,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"type":{"type":"conditional","checkType":{"type":"reference","target":204,"name":"T","package":"aurelia-dependency-injection","refersToTypeParameter":true},"extendsType":{"type":"reflection","declaration":{"id":193,"name":"__type","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"container.ts","line":611,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L611"}],"signatures":[{"id":194,"name":"__type","variant":"signature","kind":16384,"flags":{},"parameters":[{"id":195,"name":"args","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"any"}}}],"type":{"type":"inferred","name":"R"}}]}},"trueType":{"type":"reference","target":{"sourceFileName":"src/container.ts","qualifiedName":"R"},"name":"R","package":"aurelia-dependency-injection","refersToTypeParameter":true},"falseType":{"type":"conditional","checkType":{"type":"reference","target":204,"name":"T","package":"aurelia-dependency-injection","refersToTypeParameter":true},"extendsType":{"type":"reflection","declaration":{"id":196,"name":"__type","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"container.ts","line":613,"character":17,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L613"}],"signatures":[{"id":197,"name":"__type","variant":"signature","kind":16384,"flags":{"isAbstract":true},"parameters":[{"id":198,"name":"args","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"any"}}}],"type":{"type":"inferred","name":"R"}}]}},"trueType":{"type":"reference","target":{"sourceFileName":"src/container.ts","qualifiedName":"R"},"name":"R","package":"aurelia-dependency-injection","refersToTypeParameter":true},"falseType":{"type":"conditional","checkType":{"type":"reference","target":204,"name":"T","package":"aurelia-dependency-injection","refersToTypeParameter":true},"extendsType":{"type":"reference","target":590,"typeArguments":[{"type":"inferred","name":"R"}],"name":"Factory","package":"aurelia-dependency-injection"},"trueType":{"type":"reflection","declaration":{"id":199,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"container.ts","line":616,"character":10,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L616"}],"signatures":[{"id":200,"name":"__type","variant":"signature","kind":4096,"flags":{},"parameters":[{"id":201,"name":"args","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}}],"type":{"type":"reference","target":{"sourceFileName":"src/container.ts","qualifiedName":"R"},"name":"R","package":"aurelia-dependency-injection","refersToTypeParameter":true}}]}},"falseType":{"type":"conditional","checkType":{"type":"reference","target":204,"name":"T","package":"aurelia-dependency-injection","refersToTypeParameter":true},"extendsType":{"type":"reference","target":501,"typeArguments":[{"type":"inferred","name":"R"}],"name":"Lazy","package":"aurelia-dependency-injection"},"trueType":{"type":"reflection","declaration":{"id":202,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"container.ts","line":618,"character":12,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L618"}],"signatures":[{"id":203,"name":"__type","variant":"signature","kind":4096,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/container.ts","qualifiedName":"R"},"name":"R","package":"aurelia-dependency-injection","refersToTypeParameter":true}}]}},"falseType":{"type":"conditional","checkType":{"type":"reference","target":204,"name":"T","package":"aurelia-dependency-injection","refersToTypeParameter":true},"extendsType":{"type":"reference","target":611,"typeArguments":[{"type":"inferred","name":"R"}],"name":"NewInstance","package":"aurelia-dependency-injection"},"trueType":{"type":"reference","target":{"sourceFileName":"src/container.ts","qualifiedName":"R"},"name":"R","package":"aurelia-dependency-injection","refersToTypeParameter":true},"falseType":{"type":"conditional","checkType":{"type":"reference","target":204,"name":"T","package":"aurelia-dependency-injection","refersToTypeParameter":true},"extendsType":{"type":"reference","target":545,"typeArguments":[{"type":"inferred","name":"R"}],"name":"Optional","package":"aurelia-dependency-injection"},"trueType":{"type":"union","types":[{"type":"reference","target":{"sourceFileName":"src/container.ts","qualifiedName":"R"},"name":"R","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"literal","value":null}]},"falseType":{"type":"conditional","checkType":{"type":"reference","target":204,"name":"T","package":"aurelia-dependency-injection","refersToTypeParameter":true},"extendsType":{"type":"reference","target":524,"typeArguments":[{"type":"inferred","name":"R"}],"name":"All","package":"aurelia-dependency-injection"},"trueType":{"type":"array","elementType":{"type":"reference","target":{"sourceFileName":"src/container.ts","qualifiedName":"R"},"name":"R","package":"aurelia-dependency-injection","refersToTypeParameter":true}},"falseType":{"type":"conditional","checkType":{"type":"reference","target":204,"name":"T","package":"aurelia-dependency-injection","refersToTypeParameter":true},"extendsType":{"type":"reference","target":569,"typeArguments":[{"type":"inferred","name":"R"}],"name":"Parent","package":"aurelia-dependency-injection"},"trueType":{"type":"union","types":[{"type":"reference","target":{"sourceFileName":"src/container.ts","qualifiedName":"R"},"name":"R","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"literal","value":null}]},"falseType":{"type":"conditional","checkType":{"type":"reference","target":204,"name":"T","package":"aurelia-dependency-injection","refersToTypeParameter":true},"extendsType":{"type":"tuple","elements":[{"type":"inferred","name":"T1"},{"type":"rest","elementType":{"type":"unknown","name":"..."}}]},"trueType":{"type":"tuple","elements":[{"type":"reference","target":192,"typeArguments":[{"type":"unknown","name":"..."}],"name":"ResolvedValue","package":"aurelia-dependency-injection"},{"type":"rest","elementType":{"type":"unknown","name":"..."}}]},"falseType":{"type":"reference","target":204,"name":"T","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}}}}}}}}},{"id":457,"name":"StrategyFunctor","variant":"declaration","kind":2097152,"flags":{},"sources":[{"fileName":"resolvers.ts","line":55,"character":12,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L55"}],"typeParameters":[{"id":463,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":464,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":463,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":463,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":465,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":463,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":463,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"type":{"type":"reflection","declaration":{"id":458,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"resolvers.ts","line":59,"character":6,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L59"}],"signatures":[{"id":459,"name":"__type","variant":"signature","kind":4096,"flags":{},"parameters":[{"id":460,"name":"container","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":461,"name":"ctor","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtorOrFunctor"},"typeArguments":[{"type":"reference","target":463,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":464,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":465,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtorOrFunctor","package":"aurelia-dependency-injection"}},{"id":462,"name":"strategyResolver","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"reference","target":464,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true}}]}}},{"id":369,"name":"all","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"resolvers.ts","line":551,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L551"}],"signatures":[{"id":370,"name":"all","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies the dependency should load all instances of the given\r\nkey."}]},"sources":[{"fileName":"resolvers.ts","line":551,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L551"}],"typeParameters":[{"id":371,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":372,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":371,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":373,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":371,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":374,"name":"keyValue","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"reflection","declaration":{"id":375,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"resolvers.ts","line":557,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L557"}],"signatures":[{"id":376,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"resolvers.ts","line":557,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L557"}],"parameters":[{"id":377,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"intersection","types":[{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":371,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":372,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":373,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"},{"type":"reflection","declaration":{"id":378,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":379,"name":"inject","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"resolvers.ts","line":558,"character":52,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L558"}],"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":373,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}}],"groups":[{"title":"Properties","children":[379]}],"sources":[{"fileName":"resolvers.ts","line":558,"character":50,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L558"}]}}]}},{"id":380,"name":"_key","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}},{"id":381,"name":"index","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"intrinsic","name":"void"}}]}}}]},{"id":205,"name":"autoinject","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"injection.ts","line":16,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/injection.ts#L16"}],"signatures":[{"id":206,"name":"autoinject","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Directs the TypeScript transpiler to write-out type metadata for\r\nthe decorated class."}]},"sources":[{"fileName":"injection.ts","line":16,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/injection.ts#L16"}],"typeParameters":[{"id":207,"name":"TPotential","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":208,"name":"potentialTarget","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":207,"name":"TPotential","package":"aurelia-dependency-injection","refersToTypeParameter":true}}],"type":{"type":"conditional","checkType":{"type":"reference","target":207,"name":"TPotential","package":"aurelia-dependency-injection","refersToTypeParameter":true},"extendsType":{"type":"reference","target":218,"name":"Injectable","package":"aurelia-dependency-injection"},"trueType":{"type":"intrinsic","name":"void"},"falseType":{"type":"reflection","declaration":{"id":209,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"injection.ts","line":18,"character":42,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/injection.ts#L18"}],"signatures":[{"id":210,"name":"__type","variant":"signature","kind":4096,"flags":{},"parameters":[{"id":211,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":218,"name":"Injectable","package":"aurelia-dependency-injection"}}],"type":{"type":"intrinsic","name":"void"}}]}}}}]},{"id":405,"name":"factory","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"resolvers.ts","line":609,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L609"}],"signatures":[{"id":406,"name":"factory","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies the dependency to create a factory method, that can\r\naccept optional arguments"}]},"sources":[{"fileName":"resolvers.ts","line":609,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L609"}],"typeParameters":[{"id":407,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":408,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":407,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":409,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":407,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":410,"name":"keyValue","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"reflection","declaration":{"id":411,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"resolvers.ts","line":615,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L615"}],"signatures":[{"id":412,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"resolvers.ts","line":615,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L615"}],"parameters":[{"id":413,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"intersection","types":[{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":407,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":408,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":409,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"},{"type":"reflection","declaration":{"id":414,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":415,"name":"inject","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"resolvers.ts","line":616,"character":52,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L616"}],"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":409,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}}],"groups":[{"title":"Properties","children":[415]}],"sources":[{"fileName":"resolvers.ts","line":616,"character":50,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L616"}]}}]}},{"id":416,"name":"_key","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}},{"id":417,"name":"index","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"intrinsic","name":"void"}}]}}}]},{"id":347,"name":"getDecoratorDependencies","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"resolvers.ts","line":517,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L517"}],"signatures":[{"id":348,"name":"getDecoratorDependencies","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Used by parameter decorators to call autoinject for the target and retrieve\r\nthe target's inject property."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Returns the target's own inject property."}]}]},"sources":[{"fileName":"resolvers.ts","line":517,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L517"}],"typeParameters":[{"id":349,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":350,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":349,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":351,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":349,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":352,"name":"target","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The target class."}]},"type":{"type":"intersection","types":[{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":349,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":350,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":351,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"},{"type":"reflection","declaration":{"id":353,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":354,"name":"inject","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"resolvers.ts","line":521,"character":52,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L521"}],"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":351,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}}],"groups":[{"title":"Properties","children":[354]}],"sources":[{"fileName":"resolvers.ts","line":521,"character":50,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L521"}]}}]}}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":351,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}]}}]},{"id":212,"name":"inject","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"injection.ts","line":43,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/injection.ts#L43"}],"signatures":[{"id":213,"name":"inject","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies the dependencies that should be injected by the DI Container into the decorated class/function."}]},"sources":[{"fileName":"injection.ts","line":43,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/injection.ts#L43"}],"typeParameters":[{"id":214,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":215,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":214,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":216,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":214,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":217,"name":"rest","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":216,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}}],"type":{"type":"intrinsic","name":"any"}}]},{"id":232,"name":"invokeAsFactory","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"invokers.ts","line":21,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/invokers.ts#L21"}],"signatures":[{"id":233,"name":"invokeAsFactory","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies that the decorated item should be called as a factory\r\nfunction, rather than a constructor."}]},"sources":[{"fileName":"invokers.ts","line":21,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/invokers.ts#L21"}],"typeParameters":[{"id":234,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":235,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"}},{"id":236,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]}}],"parameters":[{"id":237,"name":"potentialTarget","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":234,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":235,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":236,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"union","types":[{"type":"intrinsic","name":"void"},{"type":"reflection","declaration":{"id":238,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"invokers.ts","line":23,"character":11,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/invokers.ts#L23"}],"signatures":[{"id":239,"name":"__type","variant":"signature","kind":4096,"flags":{},"parameters":[{"id":240,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":234,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":235,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":236,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"intrinsic","name":"void"}}]}}]}}]},{"id":223,"name":"invoker","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"invokers.ts","line":9,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/invokers.ts#L9"}],"signatures":[{"id":224,"name":"invoker","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies a custom Invoker for the decorated item."}]},"sources":[{"fileName":"invokers.ts","line":9,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/invokers.ts#L9"}],"typeParameters":[{"id":225,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":226,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"}},{"id":227,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]}}],"parameters":[{"id":228,"name":"value","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":241,"typeArguments":[{"type":"reference","target":225,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":226,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":227,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Invoker","package":"aurelia-dependency-injection"}}],"type":{"type":"reflection","declaration":{"id":229,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"invokers.ts","line":11,"character":3,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/invokers.ts#L11"}],"signatures":[{"id":230,"name":"__type","variant":"signature","kind":4096,"flags":{},"parameters":[{"id":231,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":225,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":226,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":227,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"intrinsic","name":"void"}}]}}}]},{"id":355,"name":"lazy","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"resolvers.ts","line":531,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L531"}],"signatures":[{"id":356,"name":"lazy","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies the dependency should be lazy loaded"}]},"sources":[{"fileName":"resolvers.ts","line":531,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L531"}],"typeParameters":[{"id":357,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":358,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":357,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":359,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":357,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":360,"name":"keyValue","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"reflection","declaration":{"id":361,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"resolvers.ts","line":537,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L537"}],"signatures":[{"id":362,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"resolvers.ts","line":537,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L537"}],"parameters":[{"id":363,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":364,"name":"__type","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"resolvers.ts","line":538,"character":12,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L538"}],"signatures":[{"id":365,"name":"new target","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"resolvers.ts","line":538,"character":14,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L538"}],"parameters":[{"id":366,"name":"args","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"reference","target":359,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}],"type":{"type":"union","types":[{"type":"reference","target":357,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":358,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true}]}}]}}},{"id":367,"name":"_key","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}},{"id":368,"name":"index","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"intrinsic","name":"void"}}]}}}]},{"id":418,"name":"newInstance","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"resolvers.ts","line":629,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L629"}],"signatures":[{"id":419,"name":"newInstance","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies the dependency as a new instance. Instances can optionally be registered in the container\r\nunder a different key and/or use dynamic dependencies"}]},"sources":[{"fileName":"resolvers.ts","line":629,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L629"}],"typeParameters":[{"id":420,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":421,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":420,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":422,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":420,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":423,"name":"asKeyOrTarget","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"unknown","name":"PrimitiveOrDependencyCtor & { inject?: TArgs[number][] | undefined; }"}},{"id":424,"name":"dynamicDependencies","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":422,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}}],"type":{"type":"reflection","declaration":{"id":425,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"resolvers.ts","line":638,"character":11,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L638"}],"signatures":[{"id":426,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"resolvers.ts","line":638,"character":11,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L638"}],"parameters":[{"id":427,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":428,"name":"__type","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"resolvers.ts","line":639,"character":14,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L639"}],"signatures":[{"id":429,"name":"new target","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"resolvers.ts","line":639,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L639"}],"parameters":[{"id":430,"name":"args","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"any"}}}],"type":{"type":"intrinsic","name":"any"}}]}}},{"id":431,"name":"_key","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}},{"id":432,"name":"index","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"intrinsic","name":"void"}}]}}}]},{"id":382,"name":"optional","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"resolvers.ts","line":570,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L570"}],"signatures":[{"id":383,"name":"optional","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies the dependency as optional"}]},"sources":[{"fileName":"resolvers.ts","line":570,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L570"}],"typeParameters":[{"id":384,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":385,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":384,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":386,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":384,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":387,"name":"checkParentOrTarget","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"true"}],"type":{"type":"reflection","declaration":{"id":388,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"resolvers.ts","line":576,"character":11,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L576"}],"signatures":[{"id":389,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"resolvers.ts","line":576,"character":11,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L576"}],"parameters":[{"id":390,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"intersection","types":[{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":384,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":385,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":386,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"},{"type":"reflection","declaration":{"id":391,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":392,"name":"inject","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"resolvers.ts","line":577,"character":54,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L577"}],"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":386,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}}],"groups":[{"title":"Properties","children":[392]}],"sources":[{"fileName":"resolvers.ts","line":577,"character":52,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L577"}]}}]}},{"id":393,"name":"_key","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}},{"id":394,"name":"index","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"intrinsic","name":"void"}}]}}}]},{"id":395,"name":"parent","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"resolvers.ts","line":594,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L594"}],"signatures":[{"id":396,"name":"parent","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies the dependency to look at the parent container for\r\nresolution"}]},"sources":[{"fileName":"resolvers.ts","line":594,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L594"}],"typeParameters":[{"id":397,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":398,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Impl"},"typeArguments":[{"type":"reference","target":397,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Impl","package":"aurelia-dependency-injection"}},{"id":399,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]},"default":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"Args"},"typeArguments":[{"type":"reference","target":397,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Args","package":"aurelia-dependency-injection"}}],"parameters":[{"id":400,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"intersection","types":[{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":397,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":398,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":399,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"},{"type":"reflection","declaration":{"id":401,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":402,"name":"inject","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"resolvers.ts","line":598,"character":52,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L598"}],"type":{"type":"array","elementType":{"type":"indexedAccess","indexType":{"type":"intrinsic","name":"number"},"objectType":{"type":"reference","target":399,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}}}}],"groups":[{"title":"Properties","children":[402]}],"sources":[{"fileName":"resolvers.ts","line":598,"character":50,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L598"}]}}]}},{"id":403,"name":"_key","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}},{"id":404,"name":"index","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":277,"name":"registration","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"registrations.ts","line":17,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L17"}],"signatures":[{"id":278,"name":"registration","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies a custom registration strategy for the decorated\r\nclass/function."}]},"sources":[{"fileName":"registrations.ts","line":17,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L17"}],"typeParameters":[{"id":279,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":280,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"}},{"id":281,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]}}],"parameters":[{"id":282,"name":"value","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":304,"typeArguments":[{"type":"reference","target":279,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":280,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":281,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"Registration","package":"aurelia-dependency-injection"}}],"type":{"type":"reflection","declaration":{"id":283,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"registrations.ts","line":19,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L19"}],"signatures":[{"id":284,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"registrations.ts","line":19,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L19"}],"parameters":[{"id":285,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":279,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":280,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":281,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"intrinsic","name":"void"}}]}}}]},{"id":1,"name":"resolve","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"container.ts","line":645,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L645"},{"fileName":"container.ts","line":646,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L646"},{"fileName":"container.ts","line":647,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L647"}],"signatures":[{"id":2,"name":"resolve","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Resolve a key, or list of keys based on the current container."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```ts\r\nimport { resolve } from 'aurelia-framework';\r\n// or\r\n// import { Container, resolve } from 'aurelia-dependency-injection';\r\n\r\nclass MyCustomElement {\r\n someService = resolve(MyService);\r\n}\r\n```"}]}]},"sources":[{"fileName":"container.ts","line":645,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L645"}],"typeParameters":[{"id":3,"name":"K","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"}}],"parameters":[{"id":4,"name":"key","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":3,"name":"K","package":"aurelia-dependency-injection","refersToTypeParameter":true}}],"type":{"type":"reference","target":192,"typeArguments":[{"type":"reference","target":3,"name":"K","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"ResolvedValue","package":"aurelia-dependency-injection"}},{"id":5,"name":"resolve","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"container.ts","line":646,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/container.ts#L646"}],"typeParameters":[{"id":6,"name":"K","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"array","elementType":{"type":"intrinsic","name":"any"}}}],"parameters":[{"id":7,"name":"keys","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"reference","target":6,"name":"K","package":"aurelia-dependency-injection","refersToTypeParameter":true}}],"type":{"type":"reference","target":192,"typeArguments":[{"type":"reference","target":6,"name":"K","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"ResolvedValue","package":"aurelia-dependency-injection"}}]},{"id":433,"name":"resolver","variant":"declaration","kind":64,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Indicates that the decorated class/object is a custom resolver."}]},"children":[{"id":435,"name":"decorates","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"resolvers.ts","line":19,"character":2,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L19"}],"type":{"type":"reflection","declaration":{"id":436,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"resolvers.ts","line":19,"character":14,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L19"}],"signatures":[{"id":437,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"resolvers.ts","line":19,"character":14,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L19"}],"parameters":[{"id":438,"name":"key","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"predicate","name":"key","asserts":false,"targetType":{"type":"reflection","declaration":{"id":439,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":440,"name":"get","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"resolvers.ts","line":19,"character":37,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L19"}],"signatures":[{"id":441,"name":"get","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"resolvers.ts","line":19,"character":37,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L19"}],"parameters":[{"id":442,"name":"container","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":34,"name":"Container","package":"aurelia-dependency-injection"}},{"id":443,"name":"key","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"any"}}]}],"groups":[{"title":"Methods","children":[440]}],"sources":[{"fileName":"resolvers.ts","line":19,"character":35,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L19"}]}}}}]}}}],"groups":[{"title":"Properties","children":[435]}],"sources":[{"fileName":"resolvers.ts","line":18,"character":13,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L18"}],"signatures":[{"id":434,"name":"resolver","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"resolvers.ts","line":20,"character":5,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/resolvers.ts#L20"}],"type":{"type":"intrinsic","name":"any"}}]},{"id":295,"name":"singleton","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"registrations.ts","line":37,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L37"},{"fileName":"registrations.ts","line":38,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L38"},{"fileName":"registrations.ts","line":40,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L40"}],"signatures":[{"id":296,"name":"singleton","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies to register the decorated item with a \"singleton\"\r\nlifetime."}]},"sources":[{"fileName":"registrations.ts","line":37,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L37"}],"parameters":[{"id":297,"name":"registerInChild","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"intrinsic","name":"any"}},{"id":298,"name":"singleton","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"registrations.ts","line":38,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L38"}],"typeParameters":[{"id":299,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":300,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"}},{"id":301,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]}}],"parameters":[{"id":302,"name":"key","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":299,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":300,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":301,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}},{"id":303,"name":"registerInChild","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"intrinsic","name":"any"}}]},{"id":286,"name":"transient","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"registrations.ts","line":28,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L28"}],"signatures":[{"id":287,"name":"transient","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Decorator: Specifies to register the decorated item with a \"transient\"\r\nlifetime."}]},"sources":[{"fileName":"registrations.ts","line":28,"character":16,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L28"}],"typeParameters":[{"id":288,"name":"TBase","variant":"typeParam","kind":131072,"flags":{}},{"id":289,"name":"TImpl","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"intrinsic","name":"unknown"}},{"id":290,"name":"TArgs","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"array","elementType":{"type":"intrinsic","name":"any"}},{"type":"array","elementType":{"type":"intrinsic","name":"unknown"}}]}}],"parameters":[{"id":291,"name":"key","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"PrimitiveOrDependencyCtor"},"typeArguments":[{"type":"reference","target":288,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":289,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":290,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"PrimitiveOrDependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"reflection","declaration":{"id":292,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"registrations.ts","line":19,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L19"}],"signatures":[{"id":293,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"registrations.ts","line":19,"character":9,"url":"https://github.com/aurelia/dependency-injection/blob/230e7bd42f6d2e15dd94627620eb0c09402b90cc/src/registrations.ts#L19"}],"parameters":[{"id":294,"name":"target","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/types.d.ts","qualifiedName":"DependencyCtor"},"typeArguments":[{"type":"reference","target":288,"name":"TBase","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":289,"name":"TImpl","package":"aurelia-dependency-injection","refersToTypeParameter":true},{"type":"reference","target":290,"name":"TArgs","package":"aurelia-dependency-injection","refersToTypeParameter":true}],"name":"DependencyCtor","package":"aurelia-dependency-injection"}}],"type":{"type":"intrinsic","name":"void"}}]}}}]}],"groups":[{"title":"Enumerations","children":[449]},{"title":"Classes","children":[524,34,590,256,9,501,611,545,569,329,482,313]},{"title":"Interfaces","children":[28,241,304,444,466]},{"title":"Type Aliases","children":[456,218,192,457]},{"title":"Functions","children":[369,205,405,347,212,232,223,355,418,382,395,277,1,433,295,286]}],"packageName":"aurelia-dependency-injection","readme":[{"kind":"text","text":"

\n \n \"Aurelia\"\n \n

\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![npm Version](https://img.shields.io/npm/v/aurelia-dependency-injection.svg)](https://www.npmjs.com/package/aurelia-dependency-injection)\n![ci](https://github.com/aurelia/dependency-injection/actions/workflows/main.yml/badge.svg)\n[![Discourse status](https://img.shields.io/discourse/https/meta.discourse.org/status.svg)](https://discourse.aurelia.io)\n[![Twitter](https://img.shields.io/twitter/follow/aureliaeffect.svg?style=social&label=Follow)](https://twitter.com/intent/follow?screen_name=aureliaeffect)\n[![Discord Chat](https://img.shields.io/discord/448698263508615178.svg)](https://discord.gg/RBtyM6u)\n\n# aurelia-dependency-injection\n\nThis library is part of the [Aurelia](http://www.aurelia.io/) platform and contains a lightweight, extensible dependency injection container for JavaScript.\n\n## Documentation\n\nYou can read documentation on dependency injection [here](https://aurelia.io/docs/fundamentals/dependency-injection/). If you would like to help improve this documentation, the source for the above can be found in the doc folder within this repository.\n\n## Platform Support\n\nThis library can be used in the **browser** as well as on the **server**.\n\n## Reporting Issues\n\nPlease refer to the [issue template]("},{"kind":"relative-link","text":"ISSUE_TEMPLATE.md","target":2},{"kind":"text","text":"). Accompany any bug report with a demo of the issue using a [runnable Gist](https://gist.run/?id=381fdb1a4b0865a4c25026187db865ce).\n\n## Building\n\n"},{"kind":"code","text":"```shell\nnpm run build\n```"},{"kind":"text","text":"\n\n## Tests\n\n"},{"kind":"code","text":"```shell\nnpm run test\n```"},{"kind":"text","text":"\n\n## Developing\n\nRun the tests in watch mode:\n\n"},{"kind":"code","text":"```shell\nnpm run develop\n```"},{"kind":"text","text":"\n\n## Publishing\n\n1. Bump the version\n \n "},{"kind":"code","text":"```shell\n npm run bump-version [ | major | minor | patch]\n ```"},{"kind":"text","text":"\n\n2. Prepare the release (run tests, run build, docs, release notes)\n \n "},{"kind":"code","text":"```shell\n npm run prepare-release\n ```"},{"kind":"text","text":"\n\n3. Commit, tag, npm publish (not automated)"}],"symbolIdMap":{"0":{"sourceFileName":"src/aurelia-dependency-injection.ts","qualifiedName":""},"1":{"sourceFileName":"src/container.ts","qualifiedName":"resolve"},"2":{"sourceFileName":"src/container.ts","qualifiedName":"resolve"},"3":{"sourceFileName":"src/container.ts","qualifiedName":"K"},"4":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"5":{"sourceFileName":"src/container.ts","qualifiedName":"resolve"},"6":{"sourceFileName":"src/container.ts","qualifiedName":"K"},"7":{"sourceFileName":"src/container.ts","qualifiedName":"keys"},"9":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler"},"10":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.__constructor"},"11":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler"},"12":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.TBase"},"13":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.TImpl"},"14":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.TArgs"},"15":{"sourceFileName":"src/container.ts","qualifiedName":"fn"},"16":{"sourceFileName":"src/container.ts","qualifiedName":"invoker"},"17":{"sourceFileName":"src/container.ts","qualifiedName":"dependencies"},"18":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.fn"},"19":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.invoker"},"20":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.dependencies"},"21":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.invoke"},"22":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.invoke"},"23":{"sourceFileName":"src/container.ts","qualifiedName":"container"},"24":{"sourceFileName":"src/container.ts","qualifiedName":"dynamicDependencies"},"25":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.TBase"},"26":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.TImpl"},"27":{"sourceFileName":"src/container.ts","qualifiedName":"InvocationHandler.TArgs"},"28":{"sourceFileName":"src/container.ts","qualifiedName":"ContainerConfiguration"},"29":{"sourceFileName":"src/container.ts","qualifiedName":"ContainerConfiguration.onHandlerCreated"},"30":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"31":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"32":{"sourceFileName":"src/container.ts","qualifiedName":"handler"},"33":{"sourceFileName":"src/container.ts","qualifiedName":"ContainerConfiguration.handlers"},"34":{"sourceFileName":"src/container.ts","qualifiedName":"Container"},"35":{"sourceFileName":"src/container.ts","qualifiedName":"Container.instance"},"36":{"sourceFileName":"src/container.ts","qualifiedName":"Container.__constructor"},"37":{"sourceFileName":"src/container.ts","qualifiedName":"Container"},"38":{"sourceFileName":"src/container.ts","qualifiedName":"configuration"},"39":{"sourceFileName":"src/container.ts","qualifiedName":"Container.parent"},"40":{"sourceFileName":"src/container.ts","qualifiedName":"Container.root"},"48":{"sourceFileName":"src/container.ts","qualifiedName":"Container.makeGlobal"},"49":{"sourceFileName":"src/container.ts","qualifiedName":"Container.makeGlobal"},"50":{"sourceFileName":"src/container.ts","qualifiedName":"Container.setHandlerCreatedCallback"},"51":{"sourceFileName":"src/container.ts","qualifiedName":"Container.setHandlerCreatedCallback"},"52":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"53":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"54":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"55":{"sourceFileName":"src/container.ts","qualifiedName":"onHandlerCreated"},"56":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"57":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"58":{"sourceFileName":"src/container.ts","qualifiedName":"handler"},"59":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerInstance"},"60":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerInstance"},"61":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"62":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"63":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"64":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"65":{"sourceFileName":"src/container.ts","qualifiedName":"instance"},"66":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerSingleton"},"67":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerSingleton"},"68":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"69":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"70":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"71":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"72":{"sourceFileName":"src/container.ts","qualifiedName":"fn"},"73":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerSingleton"},"74":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"75":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"76":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"77":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"78":{"sourceFileName":"src/container.ts","qualifiedName":"fn"},"79":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerTransient"},"80":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerTransient"},"81":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"82":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"83":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"84":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"85":{"sourceFileName":"src/container.ts","qualifiedName":"fn"},"86":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerTransient"},"87":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"88":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"89":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"90":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"91":{"sourceFileName":"src/container.ts","qualifiedName":"fn"},"92":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerHandler"},"93":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerHandler"},"94":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"95":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"96":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"97":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"98":{"sourceFileName":"src/container.ts","qualifiedName":"handler"},"99":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"100":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"101":{"sourceFileName":"src/container.ts","qualifiedName":"container"},"102":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"103":{"sourceFileName":"src/container.ts","qualifiedName":"resolver"},"104":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerAlias"},"105":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerAlias"},"106":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"107":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"108":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"109":{"sourceFileName":"src/container.ts","qualifiedName":"originalKey"},"110":{"sourceFileName":"src/container.ts","qualifiedName":"aliasKey"},"111":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerResolver"},"112":{"sourceFileName":"src/container.ts","qualifiedName":"Container.registerResolver"},"113":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"114":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"115":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"116":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"117":{"sourceFileName":"src/container.ts","qualifiedName":"resolver"},"118":{"sourceFileName":"src/container.ts","qualifiedName":"Container.autoRegister"},"119":{"sourceFileName":"src/container.ts","qualifiedName":"Container.autoRegister"},"120":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"121":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"122":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"123":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"124":{"sourceFileName":"src/container.ts","qualifiedName":"fn"},"125":{"sourceFileName":"src/container.ts","qualifiedName":"Container.autoRegister"},"126":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"127":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"128":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"129":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"130":{"sourceFileName":"src/container.ts","qualifiedName":"fn"},"131":{"sourceFileName":"src/container.ts","qualifiedName":"Container.autoRegisterAll"},"132":{"sourceFileName":"src/container.ts","qualifiedName":"Container.autoRegisterAll"},"133":{"sourceFileName":"src/container.ts","qualifiedName":"fns"},"134":{"sourceFileName":"src/container.ts","qualifiedName":"Container.unregister"},"135":{"sourceFileName":"src/container.ts","qualifiedName":"Container.unregister"},"136":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"137":{"sourceFileName":"src/container.ts","qualifiedName":"Container.hasResolver"},"138":{"sourceFileName":"src/container.ts","qualifiedName":"Container.hasResolver"},"139":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"140":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"141":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"142":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"143":{"sourceFileName":"src/container.ts","qualifiedName":"checkParent"},"144":{"sourceFileName":"src/container.ts","qualifiedName":"Container.getResolver"},"145":{"sourceFileName":"src/container.ts","qualifiedName":"Container.getResolver"},"146":{"sourceFileName":"src/container.ts","qualifiedName":"TStrategyKey"},"147":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"148":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"149":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"150":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"151":{"sourceFileName":"src/container.ts","qualifiedName":"Container.get"},"152":{"sourceFileName":"src/container.ts","qualifiedName":"Container.get"},"153":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"154":{"sourceFileName":"src/container.ts","qualifiedName":"TResolver"},"155":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"156":{"sourceFileName":"src/container.ts","qualifiedName":"Container.get"},"157":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"158":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"159":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"160":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"161":{"sourceFileName":"src/container.ts","qualifiedName":"Container.get"},"162":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"163":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"164":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"165":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"166":{"sourceFileName":"src/container.ts","qualifiedName":"Container._get"},"167":{"sourceFileName":"src/container.ts","qualifiedName":"Container._get"},"168":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"169":{"sourceFileName":"src/container.ts","qualifiedName":"Container.getAll"},"170":{"sourceFileName":"src/container.ts","qualifiedName":"Container.getAll"},"171":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"172":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"173":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"174":{"sourceFileName":"src/container.ts","qualifiedName":"key"},"175":{"sourceFileName":"src/container.ts","qualifiedName":"Container.createChild"},"176":{"sourceFileName":"src/container.ts","qualifiedName":"Container.createChild"},"177":{"sourceFileName":"src/container.ts","qualifiedName":"Container.invoke"},"178":{"sourceFileName":"src/container.ts","qualifiedName":"Container.invoke"},"179":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"180":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"181":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"182":{"sourceFileName":"src/container.ts","qualifiedName":"fn"},"183":{"sourceFileName":"src/container.ts","qualifiedName":"dynamicDependencies"},"184":{"sourceFileName":"src/container.ts","qualifiedName":"Container._createInvocationHandler"},"185":{"sourceFileName":"src/container.ts","qualifiedName":"Container._createInvocationHandler"},"186":{"sourceFileName":"src/container.ts","qualifiedName":"TBase"},"187":{"sourceFileName":"src/container.ts","qualifiedName":"TImpl"},"188":{"sourceFileName":"src/container.ts","qualifiedName":"TArgs"},"189":{"sourceFileName":"src/container.ts","qualifiedName":"fn"},"190":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"191":{"sourceFileName":"src/container.ts","qualifiedName":"__type.inject"},"192":{"sourceFileName":"src/container.ts","qualifiedName":"ResolvedValue"},"193":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"194":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"195":{"sourceFileName":"src/container.ts","qualifiedName":"args"},"196":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"197":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"198":{"sourceFileName":"src/container.ts","qualifiedName":"args"},"199":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"200":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"201":{"sourceFileName":"src/container.ts","qualifiedName":"args"},"202":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"203":{"sourceFileName":"src/container.ts","qualifiedName":"__type"},"204":{"sourceFileName":"src/container.ts","qualifiedName":"T"},"205":{"sourceFileName":"src/injection.ts","qualifiedName":"autoinject"},"206":{"sourceFileName":"src/injection.ts","qualifiedName":"autoinject"},"207":{"sourceFileName":"src/injection.ts","qualifiedName":"TPotential"},"208":{"sourceFileName":"src/injection.ts","qualifiedName":"potentialTarget"},"209":{"sourceFileName":"src/injection.ts","qualifiedName":"__type"},"210":{"sourceFileName":"src/injection.ts","qualifiedName":"__type"},"211":{"sourceFileName":"src/injection.ts","qualifiedName":"target"},"212":{"sourceFileName":"src/injection.ts","qualifiedName":"inject"},"213":{"sourceFileName":"src/injection.ts","qualifiedName":"inject"},"214":{"sourceFileName":"src/injection.ts","qualifiedName":"TBase"},"215":{"sourceFileName":"src/injection.ts","qualifiedName":"TImpl"},"216":{"sourceFileName":"src/injection.ts","qualifiedName":"TArgs"},"217":{"sourceFileName":"src/injection.ts","qualifiedName":"rest"},"218":{"sourceFileName":"src/injection.ts","qualifiedName":"Injectable"},"219":{"sourceFileName":"src/injection.ts","qualifiedName":"__type"},"220":{"sourceFileName":"src/injection.ts","qualifiedName":"__type.inject"},"221":{"sourceFileName":"src/injection.ts","qualifiedName":"__type"},"222":{"sourceFileName":"src/injection.ts","qualifiedName":"__type"},"223":{"sourceFileName":"src/invokers.ts","qualifiedName":"invoker"},"224":{"sourceFileName":"src/invokers.ts","qualifiedName":"invoker"},"225":{"sourceFileName":"src/invokers.ts","qualifiedName":"TBase"},"226":{"sourceFileName":"src/invokers.ts","qualifiedName":"TImpl"},"227":{"sourceFileName":"src/invokers.ts","qualifiedName":"TArgs"},"228":{"sourceFileName":"src/invokers.ts","qualifiedName":"value"},"229":{"sourceFileName":"src/invokers.ts","qualifiedName":"__type"},"230":{"sourceFileName":"src/invokers.ts","qualifiedName":"__type"},"231":{"sourceFileName":"src/invokers.ts","qualifiedName":"target"},"232":{"sourceFileName":"src/invokers.ts","qualifiedName":"invokeAsFactory"},"233":{"sourceFileName":"src/invokers.ts","qualifiedName":"invokeAsFactory"},"234":{"sourceFileName":"src/invokers.ts","qualifiedName":"TBase"},"235":{"sourceFileName":"src/invokers.ts","qualifiedName":"TImpl"},"236":{"sourceFileName":"src/invokers.ts","qualifiedName":"TArgs"},"237":{"sourceFileName":"src/invokers.ts","qualifiedName":"potentialTarget"},"238":{"sourceFileName":"src/invokers.ts","qualifiedName":"__type"},"239":{"sourceFileName":"src/invokers.ts","qualifiedName":"__type"},"240":{"sourceFileName":"src/invokers.ts","qualifiedName":"target"},"241":{"sourceFileName":"src/invokers.ts","qualifiedName":"Invoker"},"242":{"sourceFileName":"src/invokers.ts","qualifiedName":"Invoker.invoke"},"243":{"sourceFileName":"src/invokers.ts","qualifiedName":"Invoker.invoke"},"244":{"sourceFileName":"src/invokers.ts","qualifiedName":"container"},"245":{"sourceFileName":"src/invokers.ts","qualifiedName":"fn"},"246":{"sourceFileName":"src/invokers.ts","qualifiedName":"dependencies"},"247":{"sourceFileName":"src/invokers.ts","qualifiedName":"Invoker.invokeWithDynamicDependencies"},"248":{"sourceFileName":"src/invokers.ts","qualifiedName":"Invoker.invokeWithDynamicDependencies"},"249":{"sourceFileName":"src/invokers.ts","qualifiedName":"container"},"250":{"sourceFileName":"src/invokers.ts","qualifiedName":"fn"},"251":{"sourceFileName":"src/invokers.ts","qualifiedName":"staticDependencies"},"252":{"sourceFileName":"src/invokers.ts","qualifiedName":"dynamicDependencies"},"253":{"sourceFileName":"src/invokers.ts","qualifiedName":"Invoker.TBase"},"254":{"sourceFileName":"src/invokers.ts","qualifiedName":"Invoker.TImpl"},"255":{"sourceFileName":"src/invokers.ts","qualifiedName":"Invoker.TArgs"},"256":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker"},"257":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.instance"},"260":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.TBase"},"261":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.TImpl"},"262":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.TArgs"},"263":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.invoke"},"264":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.invoke"},"265":{"sourceFileName":"src/invokers.ts","qualifiedName":"container"},"266":{"sourceFileName":"src/invokers.ts","qualifiedName":"fn"},"267":{"sourceFileName":"src/invokers.ts","qualifiedName":"dependencies"},"268":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.invokeWithDynamicDependencies"},"269":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.invokeWithDynamicDependencies"},"270":{"sourceFileName":"src/invokers.ts","qualifiedName":"container"},"271":{"sourceFileName":"src/invokers.ts","qualifiedName":"fn"},"272":{"sourceFileName":"src/invokers.ts","qualifiedName":"staticDependencies"},"273":{"sourceFileName":"src/invokers.ts","qualifiedName":"dynamicDependencies"},"274":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.TBase"},"275":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.TImpl"},"276":{"sourceFileName":"src/invokers.ts","qualifiedName":"FactoryInvoker.TArgs"},"277":{"sourceFileName":"src/registrations.ts","qualifiedName":"registration"},"278":{"sourceFileName":"src/registrations.ts","qualifiedName":"registration"},"279":{"sourceFileName":"src/registrations.ts","qualifiedName":"TBase"},"280":{"sourceFileName":"src/registrations.ts","qualifiedName":"TImpl"},"281":{"sourceFileName":"src/registrations.ts","qualifiedName":"TArgs"},"282":{"sourceFileName":"src/registrations.ts","qualifiedName":"value"},"283":{"sourceFileName":"src/registrations.ts","qualifiedName":"__function"},"284":{"sourceFileName":"src/registrations.ts","qualifiedName":"__function"},"285":{"sourceFileName":"src/registrations.ts","qualifiedName":"target"},"286":{"sourceFileName":"src/registrations.ts","qualifiedName":"transient"},"287":{"sourceFileName":"src/registrations.ts","qualifiedName":"transient"},"288":{"sourceFileName":"src/registrations.ts","qualifiedName":"TBase"},"289":{"sourceFileName":"src/registrations.ts","qualifiedName":"TImpl"},"290":{"sourceFileName":"src/registrations.ts","qualifiedName":"TArgs"},"291":{"sourceFileName":"src/registrations.ts","qualifiedName":"key"},"292":{"sourceFileName":"src/registrations.ts","qualifiedName":"__function"},"293":{"sourceFileName":"src/registrations.ts","qualifiedName":"__function"},"294":{"sourceFileName":"src/registrations.ts","qualifiedName":"target"},"295":{"sourceFileName":"src/registrations.ts","qualifiedName":"singleton"},"296":{"sourceFileName":"src/registrations.ts","qualifiedName":"singleton"},"297":{"sourceFileName":"src/registrations.ts","qualifiedName":"registerInChild"},"298":{"sourceFileName":"src/registrations.ts","qualifiedName":"singleton"},"299":{"sourceFileName":"src/registrations.ts","qualifiedName":"TBase"},"300":{"sourceFileName":"src/registrations.ts","qualifiedName":"TImpl"},"301":{"sourceFileName":"src/registrations.ts","qualifiedName":"TArgs"},"302":{"sourceFileName":"src/registrations.ts","qualifiedName":"key"},"303":{"sourceFileName":"src/registrations.ts","qualifiedName":"registerInChild"},"304":{"sourceFileName":"src/registrations.ts","qualifiedName":"Registration"},"305":{"sourceFileName":"src/registrations.ts","qualifiedName":"Registration.registerResolver"},"306":{"sourceFileName":"src/registrations.ts","qualifiedName":"Registration.registerResolver"},"307":{"sourceFileName":"src/registrations.ts","qualifiedName":"container"},"308":{"sourceFileName":"src/registrations.ts","qualifiedName":"key"},"309":{"sourceFileName":"src/registrations.ts","qualifiedName":"fn"},"310":{"sourceFileName":"src/registrations.ts","qualifiedName":"Registration.TBase"},"311":{"sourceFileName":"src/registrations.ts","qualifiedName":"Registration.TImpl"},"312":{"sourceFileName":"src/registrations.ts","qualifiedName":"Registration.TArgs"},"313":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration"},"314":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration.__constructor"},"315":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration"},"316":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration.TBase"},"317":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration.TImpl"},"318":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration.TArgs"},"319":{"sourceFileName":"src/registrations.ts","qualifiedName":"key"},"321":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration.registerResolver"},"322":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration.registerResolver"},"323":{"sourceFileName":"src/registrations.ts","qualifiedName":"container"},"324":{"sourceFileName":"src/registrations.ts","qualifiedName":"key"},"325":{"sourceFileName":"src/registrations.ts","qualifiedName":"fn"},"326":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration.TBase"},"327":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration.TImpl"},"328":{"sourceFileName":"src/registrations.ts","qualifiedName":"TransientRegistration.TArgs"},"329":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration"},"330":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration.__constructor"},"331":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration"},"332":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration.TBase"},"333":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration.TImpl"},"334":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration.TArgs"},"335":{"sourceFileName":"src/registrations.ts","qualifiedName":"keyOrRegisterInChild"},"336":{"sourceFileName":"src/registrations.ts","qualifiedName":"registerInChild"},"339":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration.registerResolver"},"340":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration.registerResolver"},"341":{"sourceFileName":"src/registrations.ts","qualifiedName":"container"},"342":{"sourceFileName":"src/registrations.ts","qualifiedName":"key"},"343":{"sourceFileName":"src/registrations.ts","qualifiedName":"fn"},"344":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration.TBase"},"345":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration.TImpl"},"346":{"sourceFileName":"src/registrations.ts","qualifiedName":"SingletonRegistration.TArgs"},"347":{"sourceFileName":"src/resolvers.ts","qualifiedName":"getDecoratorDependencies"},"348":{"sourceFileName":"src/resolvers.ts","qualifiedName":"getDecoratorDependencies"},"349":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"350":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"351":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"352":{"sourceFileName":"src/resolvers.ts","qualifiedName":"target"},"353":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"354":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type.inject"},"355":{"sourceFileName":"src/resolvers.ts","qualifiedName":"lazy"},"356":{"sourceFileName":"src/resolvers.ts","qualifiedName":"lazy"},"357":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"358":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"359":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"360":{"sourceFileName":"src/resolvers.ts","qualifiedName":"keyValue"},"361":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__function"},"362":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__function"},"363":{"sourceFileName":"src/resolvers.ts","qualifiedName":"target"},"364":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"365":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"366":{"sourceFileName":"src/resolvers.ts","qualifiedName":"args"},"367":{"sourceFileName":"src/resolvers.ts","qualifiedName":"_key"},"368":{"sourceFileName":"src/resolvers.ts","qualifiedName":"index"},"369":{"sourceFileName":"src/resolvers.ts","qualifiedName":"all"},"370":{"sourceFileName":"src/resolvers.ts","qualifiedName":"all"},"371":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"372":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"373":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"374":{"sourceFileName":"src/resolvers.ts","qualifiedName":"keyValue"},"375":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__function"},"376":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__function"},"377":{"sourceFileName":"src/resolvers.ts","qualifiedName":"target"},"378":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"379":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type.inject"},"380":{"sourceFileName":"src/resolvers.ts","qualifiedName":"_key"},"381":{"sourceFileName":"src/resolvers.ts","qualifiedName":"index"},"382":{"sourceFileName":"src/resolvers.ts","qualifiedName":"optional"},"383":{"sourceFileName":"src/resolvers.ts","qualifiedName":"optional"},"384":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"385":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"386":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"387":{"sourceFileName":"src/resolvers.ts","qualifiedName":"checkParentOrTarget"},"388":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__function"},"389":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__function"},"390":{"sourceFileName":"src/resolvers.ts","qualifiedName":"target"},"391":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"392":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type.inject"},"393":{"sourceFileName":"src/resolvers.ts","qualifiedName":"_key"},"394":{"sourceFileName":"src/resolvers.ts","qualifiedName":"index"},"395":{"sourceFileName":"src/resolvers.ts","qualifiedName":"parent"},"396":{"sourceFileName":"src/resolvers.ts","qualifiedName":"parent"},"397":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"398":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"399":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"400":{"sourceFileName":"src/resolvers.ts","qualifiedName":"target"},"401":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"402":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type.inject"},"403":{"sourceFileName":"src/resolvers.ts","qualifiedName":"_key"},"404":{"sourceFileName":"src/resolvers.ts","qualifiedName":"index"},"405":{"sourceFileName":"src/resolvers.ts","qualifiedName":"factory"},"406":{"sourceFileName":"src/resolvers.ts","qualifiedName":"factory"},"407":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"408":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"409":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"410":{"sourceFileName":"src/resolvers.ts","qualifiedName":"keyValue"},"411":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__function"},"412":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__function"},"413":{"sourceFileName":"src/resolvers.ts","qualifiedName":"target"},"414":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"415":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type.inject"},"416":{"sourceFileName":"src/resolvers.ts","qualifiedName":"_key"},"417":{"sourceFileName":"src/resolvers.ts","qualifiedName":"index"},"418":{"sourceFileName":"src/resolvers.ts","qualifiedName":"newInstance"},"419":{"sourceFileName":"src/resolvers.ts","qualifiedName":"newInstance"},"420":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"421":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"422":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"423":{"sourceFileName":"src/resolvers.ts","qualifiedName":"asKeyOrTarget"},"424":{"sourceFileName":"src/resolvers.ts","qualifiedName":"dynamicDependencies"},"425":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__function"},"426":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__function"},"427":{"sourceFileName":"src/resolvers.ts","qualifiedName":"target"},"428":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"429":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"430":{"sourceFileName":"src/resolvers.ts","qualifiedName":"args"},"431":{"sourceFileName":"src/resolvers.ts","qualifiedName":"_key"},"432":{"sourceFileName":"src/resolvers.ts","qualifiedName":"index"},"433":{"sourceFileName":"src/resolvers.ts","qualifiedName":"resolver"},"434":{"sourceFileName":"src/resolvers.ts","qualifiedName":"resolver"},"435":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type.decorates"},"436":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"437":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"438":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"439":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"440":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type.get"},"441":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type.get"},"442":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"443":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"444":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Resolver"},"445":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Resolver.get"},"446":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Resolver.get"},"447":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"448":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"449":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Strategy"},"450":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Strategy.instance"},"451":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Strategy.singleton"},"452":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Strategy.transient"},"453":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Strategy.function"},"454":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Strategy.array"},"455":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Strategy.alias"},"456":{"sourceFileName":"src/resolvers.ts","qualifiedName":"IStrategy"},"457":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyFunctor"},"458":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"459":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"460":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"461":{"sourceFileName":"src/resolvers.ts","qualifiedName":"ctor"},"462":{"sourceFileName":"src/resolvers.ts","qualifiedName":"strategyResolver"},"463":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"464":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"465":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"466":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyState"},"467":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyState.0"},"468":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyState.1"},"469":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyState.2"},"470":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyState.3"},"471":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyState.4"},"472":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"473":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type.get"},"474":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"475":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"476":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"477":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"478":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyState.5"},"479":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyState.TBase"},"480":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyState.TImpl"},"481":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyState.TArgs"},"482":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver"},"483":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.__constructor"},"484":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver"},"485":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.TBase"},"486":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.TImpl"},"487":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.TArgs"},"488":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.TStrategyKey"},"489":{"sourceFileName":"src/resolvers.ts","qualifiedName":"strategy"},"490":{"sourceFileName":"src/resolvers.ts","qualifiedName":"state"},"491":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.strategy"},"492":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.state"},"493":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.get"},"494":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.get"},"495":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"496":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"497":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.TBase"},"498":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.TImpl"},"499":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.TArgs"},"500":{"sourceFileName":"src/resolvers.ts","qualifiedName":"StrategyResolver.TStrategyKey"},"501":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy"},"502":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.of"},"503":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.of"},"504":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"505":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"506":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"507":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"508":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.__constructor"},"509":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy"},"510":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.TBase"},"511":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.TImpl"},"512":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.TArgs"},"513":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"515":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.__resolver_type__"},"516":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.get"},"517":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.get"},"518":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"519":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"520":{"sourceFileName":"src/resolvers.ts","qualifiedName":"__type"},"521":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.TBase"},"522":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.TImpl"},"523":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Lazy.TArgs"},"524":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All"},"525":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.of"},"526":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.of"},"527":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"528":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"529":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"530":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"531":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.__constructor"},"532":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All"},"533":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.TBase"},"534":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.TImpl"},"535":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.TArgs"},"536":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"538":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.__resolver_type__"},"539":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.get"},"540":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.get"},"541":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"542":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.TBase"},"543":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.TImpl"},"544":{"sourceFileName":"src/resolvers.ts","qualifiedName":"All.TArgs"},"545":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional"},"546":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.of"},"547":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.of"},"548":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"549":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"550":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"551":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"552":{"sourceFileName":"src/resolvers.ts","qualifiedName":"checkParent"},"553":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.__constructor"},"554":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional"},"555":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.TBase"},"556":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.TImpl"},"557":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.TArgs"},"558":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"559":{"sourceFileName":"src/resolvers.ts","qualifiedName":"checkParent"},"562":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.__resolver_type__"},"563":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.get"},"564":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.get"},"565":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"566":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.TBase"},"567":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.TImpl"},"568":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Optional.TArgs"},"569":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent"},"570":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.of"},"571":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.of"},"572":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"573":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"574":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"575":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"576":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.__constructor"},"577":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent"},"578":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.TBase"},"579":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.TImpl"},"580":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.TArgs"},"581":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"583":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.__resolver_type__"},"584":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.get"},"585":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.get"},"586":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"587":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.TBase"},"588":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.TImpl"},"589":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Parent.TArgs"},"590":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory"},"591":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.of"},"592":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.of"},"593":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"594":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"595":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"596":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"597":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.__constructor"},"598":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory"},"599":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.TBase"},"600":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.TImpl"},"601":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.TArgs"},"602":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"604":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.__resolver_type__"},"605":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.get"},"606":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.get"},"607":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"608":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.TBase"},"609":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.TImpl"},"610":{"sourceFileName":"src/resolvers.ts","qualifiedName":"Factory.TArgs"},"611":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance"},"612":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.of"},"613":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.of"},"614":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TBase"},"615":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TImpl"},"616":{"sourceFileName":"src/resolvers.ts","qualifiedName":"TArgs"},"617":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"618":{"sourceFileName":"src/resolvers.ts","qualifiedName":"dynamicDependencies"},"619":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.__constructor"},"620":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance"},"621":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.TBase"},"622":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.TImpl"},"623":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.TArgs"},"624":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"625":{"sourceFileName":"src/resolvers.ts","qualifiedName":"dynamicDependencies"},"629":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.__resolver_type__"},"630":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.get"},"631":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.get"},"632":{"sourceFileName":"src/resolvers.ts","qualifiedName":"container"},"633":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.as"},"634":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.as"},"635":{"sourceFileName":"src/resolvers.ts","qualifiedName":"key"},"636":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.TBase"},"637":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.TImpl"},"638":{"sourceFileName":"src/resolvers.ts","qualifiedName":"NewInstance.TArgs"}},"files":{"entries":{"1":"src/aurelia-dependency-injection.ts","2":"ISSUE_TEMPLATE.md"},"reflections":{"1":0}}} diff --git a/package-lock.json b/package-lock.json index 56f56a2..716424c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "aurelia-dependency-injection", - "version": "1.6.0", + "version": "1.6.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "aurelia-dependency-injection", - "version": "1.6.0", + "version": "1.6.1", "license": "MIT", "dependencies": { "aurelia-metadata": "^1.0.0", diff --git a/package.json b/package.json index 98681c2..e37d53b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-dependency-injection", - "version": "1.6.0", + "version": "1.6.1", "description": "A lightweight, extensible dependency injection container for JavaScript.", "keywords": [ "aurelia",