-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.js
38 lines (38 loc) · 1.36 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"use strict";
/* eslint-disable @typescript-eslint/no-inferrable-types */
Object.defineProperty(exports, "__esModule", { value: true });
exports.initConfig = exports.TestConfig = void 0;
const tslib_1 = require("tslib");
// Using https://github.com/bpatrik/typeconfig for configuration
const SubConfigClass_1 = require("typeconfig/src/decorators/class/SubConfigClass");
const ConfigPropoerty_1 = require("typeconfig/src/decorators/property/ConfigPropoerty");
/**
* config.ts should not import any custom package (i.e.: that is not used by the main app)
* */
let TestConfig = class TestConfig {
constructor() {
this.myFavouriteNumber = 42;
}
};
tslib_1.__decorate([
(0, ConfigPropoerty_1.ConfigProperty)({
tags: {
name: `Test config value`,
},
description: `This is just a description`,
}),
tslib_1.__metadata("design:type", Number)
], TestConfig.prototype, "myFavouriteNumber", void 0);
TestConfig = tslib_1.__decorate([
(0, SubConfigClass_1.SubConfigClass)({ softReadonly: true })
], TestConfig);
exports.TestConfig = TestConfig;
/**
* (Optional) Setting the configuration template.
* This function can be called any time. Only use it for setting config template.
*/
const initConfig = (extension) => {
extension.setConfigTemplate(TestConfig);
};
exports.initConfig = initConfig;
//# sourceMappingURL=config.js.map