1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.Version = void 0;
|
4 | const constants_1 = require("../../constants");
|
5 | /**
|
6 | * Sets the version of the endpoint to the passed version
|
7 | *
|
8 | * @publicApi
|
9 | */
|
10 | function 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 | }
|
20 | exports.Version = Version;
|