Skip to content

Commit 9d2c7ff

Browse files
committed
Fix TS issue in setup-server
1 parent e454445 commit 9d2c7ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

setup-server.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as path from 'path';
22
import * as os from 'os';
3-
import { promises as fs } from 'fs'
3+
import { promises as fs, createWriteStream } from 'fs'
44
import { promisify } from 'util';
55

66
import * as _ from 'lodash';
@@ -88,9 +88,9 @@ async function insertServer(
8888
const downloadPath = path.join(buildPath, 'httptoolkit-server.tar.gz');
8989

9090
const assetDownload = await fetch(asset.browser_download_url);
91-
const assetWrite = assetDownload.body.pipe(fs.createWriteStream(downloadPath));
91+
const assetWrite = assetDownload.body.pipe(createWriteStream(downloadPath));
9292

93-
await new Promise((resolve, reject) => {
93+
await new Promise<void>((resolve, reject) => {
9494
assetWrite.on('finish', resolve);
9595
assetWrite.on('error', reject);
9696
});

0 commit comments

Comments
 (0)