1 | "use strict";
|
2 |
|
3 |
|
4 | Object.defineProperty(exports, "__esModule", { value: true });
|
5 | exports.toCommandProperties = exports.toCommandValue = void 0;
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | function toCommandValue(input) {
|
11 | if (input === null || input === undefined) {
|
12 | return '';
|
13 | }
|
14 | else if (typeof input === 'string' || input instanceof String) {
|
15 | return input;
|
16 | }
|
17 | return JSON.stringify(input);
|
18 | }
|
19 | exports.toCommandValue = toCommandValue;
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | function toCommandProperties(annotationProperties) {
|
27 | if (!Object.keys(annotationProperties).length) {
|
28 | return {};
|
29 | }
|
30 | return {
|
31 | title: annotationProperties.title,
|
32 | file: annotationProperties.file,
|
33 | line: annotationProperties.startLine,
|
34 | endLine: annotationProperties.endLine,
|
35 | col: annotationProperties.startColumn,
|
36 | endColumn: annotationProperties.endColumn
|
37 | };
|
38 | }
|
39 | exports.toCommandProperties = toCommandProperties;
|
40 |
|
\ | No newline at end of file |