Skip to content

Commit

Permalink
review comment: add explicit return type
Browse files Browse the repository at this point in the history
  • Loading branch information
casparneumann-cap committed Nov 13, 2023
1 parent 1c6a720 commit 78b2c19
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class H5PLibraryManagementService {
this.libraryWishList = (parse(librariesYamlContent) as { h5p_libraries: string[] }).h5p_libraries;
}

async uninstallUnwantedLibraries(wantedLibraries: string[]) {
async uninstallUnwantedLibraries(wantedLibraries: string[]): Promise<void> {
const installedLibraries = await this.libraryAdministration.getLibraries();
for (const installedLibrary of installedLibraries) {
if (!wantedLibraries.includes(installedLibrary.machineName) && installedLibrary.dependentsCount === 0) {
Expand All @@ -66,7 +66,7 @@ export class H5PLibraryManagementService {
}
}

async installLibraries(libraries: string[]) {
async installLibraries(libraries: string[]): Promise<void> {
for (const libname of libraries) {
// avoid conflicts, install one-by-one:
// eslint-disable-next-line no-await-in-loop
Expand All @@ -80,7 +80,7 @@ export class H5PLibraryManagementService {
}
}

async run() {
async run(): Promise<void> {
await this.uninstallUnwantedLibraries(this.libraryWishList);
await this.installLibraries(this.libraryWishList);
}
Expand Down

0 comments on commit 78b2c19

Please sign in to comment.