Compare commits
No commits in common. "17a434f400f6425b854a8c1ff28af47e44b557f5" and "302181c70701dcf79cd7cd68e4816ac394ff0795" have entirely different histories.
17a434f400
...
302181c707
|
@ -17,7 +17,6 @@ export default class Config {
|
|||
openDir(dir: string): void;
|
||||
open(file: string): void;
|
||||
save(file: string, data: object): void;
|
||||
savePath(file: string, path: string): void;
|
||||
set(key: string, value: any): void;
|
||||
has(key: string): any;
|
||||
private normalize;
|
||||
|
|
|
@ -89,9 +89,6 @@ class Config {
|
|||
fs_1.default.writeFileSync(fullPath, JSON.stringify(data));
|
||||
this.open(fullPath);
|
||||
}
|
||||
savePath(file, path) {
|
||||
this.save(file, this.get(path));
|
||||
}
|
||||
set(key, value) {
|
||||
(0, bsert_1.default)(typeof key === "string", "Key must be a string.");
|
||||
if (value == null) {
|
||||
|
|
|
@ -94,7 +94,7 @@ export default class Config {
|
|||
}
|
||||
}
|
||||
|
||||
public save(file: string, data: object): void {
|
||||
public save(file: string, data: object) {
|
||||
assert(typeof data === "object");
|
||||
assert(!Array.isArray(data));
|
||||
|
||||
|
@ -109,10 +109,6 @@ export default class Config {
|
|||
this.open(fullPath);
|
||||
}
|
||||
|
||||
public savePath(file: string, path: string): void {
|
||||
this.save(file, this.get(path));
|
||||
}
|
||||
|
||||
public set(key: string, value: any) {
|
||||
assert(typeof key === "string", "Key must be a string.");
|
||||
|
||||
|
|
Loading…
Reference in New Issue