Commit 2786c34b authored by nanahira's avatar nanahira

so far works

parent 563f37d3
......@@ -17,4 +17,4 @@ Thumbs.db
messages.xlf
messages.xlf.bak
locale/*.xlf.bak
/package-lock.json
# /package-lock.json
......@@ -94,7 +94,7 @@ export class AppDetailComponent implements OnInit, OnChanges {
this.availableLibraries.push(currentVolume);
}
}
resolve();
resolve(null);
});
});
}
......
......@@ -193,7 +193,7 @@ export class App {
findDependencies(): App[] {
if (this.dependencies && this.dependencies.size > 0) {
let set = new Set();
let set = new Set<App>();
for (let dependency of this.dependencies.values()) {
dependency.findDependencies()
.forEach((value) => {
......
......@@ -368,7 +368,7 @@ export class AppsService {
checksumFiles.set(file, 'DO_NOT_CARE_HASH');
}
}
resolve();
resolve(null);
});
});
}
......@@ -404,7 +404,7 @@ export class AppsService {
}
}
}
resolve();
resolve(null);
} catch (e) {
reject(e);
}
......@@ -455,7 +455,7 @@ export class AppsService {
result.set(file, sha256sum);
}
callback();
resolve();
resolve(null);
});
});
}
......@@ -492,7 +492,7 @@ export class AppsService {
localFiles = await this.verifyFiles(app, latestFiles, () => {
app.status.progress += 1;
});
resolve();
resolve(null);
} catch (e) {
reject(e);
}
......@@ -524,7 +524,7 @@ export class AppsService {
ignoreFiles.add(file);
}
}
resolve();
resolve(null);
});
});
}
......@@ -652,7 +652,7 @@ export class AppsService {
}, (error) => {
reject(error);
}, () => {
resolve();
resolve(null);
});
});
}
......@@ -674,7 +674,7 @@ export class AppsService {
await new Promise((resolve, reject) => {
this.eventEmitter.subscribe(() => {
if (task.app.readyForInstall()) {
resolve();
resolve(null);
} else if (task.app.findDependencies().find((dependency: App) => !dependency.isInstalled())) {
reject('Dependencies failed');
}
......@@ -784,7 +784,7 @@ export class AppsService {
if (error) {
reject(error);
} else {
resolve();
resolve(null);
}
});
});
......@@ -824,7 +824,7 @@ export class AppsService {
if (error) {
reject(error);
} else {
resolve();
resolve(null);
}
});
});
......@@ -988,7 +988,7 @@ export class AppsService {
await this.backupFiles(app.parent!.local!.path, backupPath, conflictFiles, (n) => {
app.status.progress += 1;
});
resolve();
resolve(null);
} catch (e) {
reject(e);
}
......@@ -1009,7 +1009,7 @@ export class AppsService {
reject(error);
},
() => {
resolve();
resolve(null);
});
});
}
......@@ -1263,7 +1263,7 @@ export class AppsService {
await this.restoreFiles(appDir, backupDir, Array.from(difference));
}
}
resolve();
resolve(null);
} catch (e) {
reject(e);
}
......
......@@ -171,7 +171,7 @@ export class DownloadService {
if (allStatus.status === 'error') {
throw `Download Error: code ${allStatus.errorCode}, message: ${allStatus.errorMessage}`;
} else if (allStatus.status === 'complete') {
resolve();
resolve(null);
subscription.unsubscribe();
} else {
callback(allStatus);
......
......@@ -28,7 +28,7 @@ export class ComparableSet<T> extends Set<T> {
}
intersection(setB: Set<T>): Set<T> {
let intersection = new Set();
let intersection = new Set<T>();
for (let elem of setB) {
if (this.has(elem)) {
intersection.add(elem);
......
......@@ -530,7 +530,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
child.on('exit', async (code, signal) => {
// error 触发之后还可能会触发exit,但是Promise只承认首次状态转移,因此这里无需重复判断是否已经error过。
await this.refresh();
resolve();
resolve(null);
win.restore();
});
try {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -14,6 +14,7 @@
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"strictNullChecks": false,
"strict": false,
"skipLibCheck": true
},
"files": [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment