Skip to content

Commit

Permalink
fix: Fix linter errors (#705)
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach committed Oct 23, 2023
1 parent 618cab3 commit c3977b9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions lib/stubs.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
// @ts-nocheck
declare module 'adbkit-apkreader';
declare module 'asyncbox';
4 changes: 2 additions & 2 deletions lib/tools/apk-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,7 @@ apkUtilsMethods.ensureCurrentLocale = async function ensureCurrentLocale (langua

const apiLevel = await this.getApiLevel();

return await retryInterval(5, 1000, async () => {
return /** @type {boolean} */ (await retryInterval(5, 1000, async () => {
try {
if (apiLevel < 23) {
let curLanguage, curCountry;
Expand Down Expand Up @@ -1057,7 +1057,7 @@ apkUtilsMethods.ensureCurrentLocale = async function ensureCurrentLocale (langua
}
throw err;
}
});
}));
};

/**
Expand Down
8 changes: 4 additions & 4 deletions lib/tools/system-calls.js
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ systemCallMethods.getRunningAVD = async function getRunningAVD (avdName) {
*/
systemCallMethods.getRunningAVDWithRetry = async function getRunningAVDWithRetry (avdName, timeoutMs = 20000) {
try {
return await waitForCondition(async () => {
return /** @type {Device|null} */ (await waitForCondition(async () => {
try {
return await this.getRunningAVD(avdName.replace('@', ''));
} catch (e) {
Expand All @@ -786,7 +786,7 @@ systemCallMethods.getRunningAVDWithRetry = async function getRunningAVDWithRetry
}, {
waitMs: timeoutMs,
intervalMs: 1000,
});
}));
} catch (e) {
throw new Error(`Error getting AVD with retry. Original error: ${e.message}`);
}
Expand Down Expand Up @@ -819,9 +819,9 @@ systemCallMethods.killAllEmulators = async function killAllEmulators () {
* is thrown is given avd does not exist/is not running.
*
* @this {import('../adb.js').ADB}
* @param {?string} avdName - The name of the emulator to be killed. If empty,
* @param {string?} [avdName=null] - The name of the emulator to be killed. If empty,
* the current emulator will be killed.
* @param {?number} [timeout=60000] - The amount of time to wait before throwing
* @param {number} [timeout=60000] - The amount of time to wait before throwing
* an exception about unsuccessful killing
* @return {Promise<boolean>} - True if the emulator was killed, false otherwise.
* @throws {Error} if there was a failure by killing the emulator
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"compilerOptions": {
"outDir": "build",
"checkJs": true,
"esModuleInterop": true,
"types": ["node"],
"strict": false
},
Expand Down

0 comments on commit c3977b9

Please sign in to comment.