UNPKG

580 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.Version = void 0;
4const constants_1 = require("../../constants");
5/**
6 * Sets the version of the endpoint to the passed version
7 *
8 * @publicApi
9 */
10function Version(version) {
11 if (Array.isArray(version)) {
12 // Drop duplicated versions
13 version = Array.from(new Set(version));
14 }
15 return (target, key, descriptor) => {
16 Reflect.defineMetadata(constants_1.VERSION_METADATA, version, descriptor.value);
17 return descriptor;
18 };
19}
20exports.Version = Version;