@dolittle/sdk.projections
Version:
Dolittle is a decentralized, distributed, event-driven microservice platform built to harness the power of events.
31 lines • 1.77 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.OccurredFormat = void 0;
const concepts_1 = require("@dolittle/concepts");
/**
* Represents the format used to represent the date time mapping of when events occurred to projections.
*/
class OccurredFormat extends concepts_1.ConceptAs {
/**
* Initializes a new instance of {@link PropertyNameKeySelector}.
* @param {string} format - The event occurred format.
*/
constructor(format) {
super(format, '@dolittle/sdk.projections.OccurredFormat');
}
/**
* Creates a {@link OccurredFormat} from a string.
* @param {string | OccurredFormat} format - The format to convert.
* @returns {OccurredFormat} The converted key selector.
*/
static from(format) {
if (format instanceof OccurredFormat) {
return format;
}
return new OccurredFormat(format);
}
}
exports.OccurredFormat = OccurredFormat;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT2NjdXJyZWRGb3JtYXQuanMiLCJzb3VyY2VSb290IjoiLi4vIiwic291cmNlcyI6WyJPY2N1cnJlZEZvcm1hdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsK0NBQStDO0FBQy9DLHFHQUFxRzs7O0FBRXJHLGlEQUErQztBQUUvQzs7R0FFRztBQUNILE1BQWEsY0FBZSxTQUFRLG9CQUE2RDtJQUM3Rjs7O09BR0c7SUFDSCxZQUFZLE1BQWM7UUFDdEIsS0FBSyxDQUFDLE1BQU0sRUFBRSwwQ0FBMEMsQ0FBQyxDQUFDO0lBQzlELENBQUM7SUFFRDs7OztPQUlHO0lBQ0gsTUFBTSxDQUFDLElBQUksQ0FBQyxNQUErQjtRQUN2QyxJQUFJLE1BQU0sWUFBWSxjQUFjLEVBQUU7WUFBRSxPQUFPLE1BQU0sQ0FBQztTQUFFO1FBQ3hELE9BQU8sSUFBSSxjQUFjLENBQUMsTUFBTSxDQUFDLENBQUM7SUFDdEMsQ0FBQztDQUNKO0FBbEJELHdDQWtCQyJ9