UNPKG

@dolittle/sdk.artifacts

Version:

Dolittle is a decentralized, distributed, event-driven microservice platform built to harness the power of events.

23 lines 1.51 kB
"use strict"; // 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.ArtifactMap = void 0; const ComplexValueMap_1 = require("./Mappings/ComplexValueMap"); /** * Represents a map for mapping an {@link Artifact} to a value. * @template TArtifact The type of the artifact to use as key. * @template TId The type of the artifact id. * @template V The type of the value. */ class ArtifactMap extends ComplexValueMap_1.ComplexValueMap { /** * Initialises a new instance of the {@link ArtifactMap} class. * @param {Constructor} artifactType - The type of the artifact. */ constructor(artifactType) { super(artifactType, artifact => [artifact.id.value.toString(), artifact.generation.value], 2); } } exports.ArtifactMap = ArtifactMap; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXJ0aWZhY3RNYXAuanMiLCJzb3VyY2VSb290IjoiLi4vIiwic291cmNlcyI6WyJBcnRpZmFjdE1hcC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsK0NBQStDO0FBQy9DLHFHQUFxRzs7O0FBTXJHLGdFQUE2RDtBQUc3RDs7Ozs7R0FLRztBQUNILE1BQWEsV0FBcUYsU0FBUSxpQ0FBK0M7SUFDcko7OztPQUdHO0lBQ0gsWUFDSSxZQUFvQztRQUVwQyxLQUFLLENBQUMsWUFBWSxFQUFFLFFBQVEsQ0FBQyxFQUFFLENBQUMsQ0FBQyxRQUFRLENBQUMsRUFBRSxDQUFDLEtBQUssQ0FBQyxRQUFRLEVBQUUsRUFBRSxRQUFRLENBQUMsVUFBVSxDQUFDLEtBQUssQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDO0lBQ2xHLENBQUM7Q0FDSjtBQVZELGtDQVVDIn0=