-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutility.ts
34 lines (27 loc) · 933 Bytes
/
utility.ts
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
"use strict";
import * as path from 'path';
import * as fs from 'fs';
import * as vscode from "vscode";
export class Utility {
public constructor() {}
// Get configuration item
public static getConfiguration(): vscode.WorkspaceConfiguration {
return vscode.workspace.getConfiguration("reminder");
}
}
export default class Asset extends Utility {
//* When the parameter is directly given the parameter type, equal to the declaration and then assignment */
public constructor(private context: vscode.ExtensionContext) {
super();
}
// Get the title
public getTitle(): string {
return Utility.getConfiguration().get<string>('title', '');
}
public getImages():string[] {
return Utility.getConfiguration().get<string[]>('picture', []);
}
public getmotif(): string {
return Utility.getConfiguration().get<string>('motif', '');
}
}