silence some new ts squigglies in the editor (#3435)

This commit is contained in:
Fredrik Adelöw
2020-11-25 09:57:16 +01:00
committed by GitHub
parent 8fd5e64351
commit fae3fafcfa
10 changed files with 18 additions and 17 deletions
+2 -2
View File
@@ -93,7 +93,7 @@ export function exitWithError(err: Error & { code?: unknown }) {
*/
export function waitFor(fn: () => boolean, maxSeconds: number = 120) {
let count = 0;
return new Promise((resolve, reject) => {
return new Promise<void>((resolve, reject) => {
const handle = setInterval(() => {
if (count++ > maxSeconds * 10) {
reject(new Error('Timed out while waiting for condition'));
@@ -112,7 +112,7 @@ export async function waitForExit(child: ChildProcess) {
if (child.exitCode !== null) {
throw new Error(`Child already exited with code ${child.exitCode}`);
}
await new Promise((resolve, reject) =>
await new Promise<void>((resolve, reject) =>
child.once('exit', code => {
if (code) {
reject(new Error(`Child exited with code ${code}`));