@dolittle/sdk.aggregates
Version:
Dolittle is a decentralized, distributed, event-driven microservice platform built to harness the power of events.
21 lines • 1.2 kB
JavaScript
;
// Copyright (c) Dolittle. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
Object.defineProperty(exports, "__esModule", { value: true });
exports.IAggregateOf = void 0;
/**
* Defines a way to work with an {@link AggregateRoot}.
* @template TAggregate
*/
class IAggregateOf {
/**
* Gets a {@link ServiceIdentifier} for an {@link AggregateRoot} type to inject an {@link IAggragateOf} from the service provider.
* @param {Constructor} type - The type of the aggregate root.
* @returns {Abstract} The service identifier to use for injection.
*/
static for(type) {
return `IAggregateOf<${type.name}>`;
}
}
exports.IAggregateOf = IAggregateOf;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUFnZ3JlZ2F0ZU9mLmpzIiwic291cmNlUm9vdCI6Ii4uLyIsInNvdXJjZXMiOlsiSUFnZ3JlZ2F0ZU9mLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSwrQ0FBK0M7QUFDL0MscUdBQXFHOzs7QUFVckc7OztHQUdHO0FBQ0gsTUFBc0IsWUFBWTtJQWM5Qjs7OztPQUlHO0lBQ0gsTUFBTSxDQUFDLEdBQUcsQ0FBbUMsSUFBNkI7UUFDdEUsT0FBTyxnQkFBZ0IsSUFBSSxDQUFDLElBQUksR0FBVSxDQUFDO0lBQy9DLENBQUM7Q0FDSjtBQXRCRCxvQ0FzQkMifQ==